1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00

no readlink() on windows

This commit is contained in:
Antony Dovgal
2007-06-05 12:02:38 +00:00
parent c241e7584a
commit d7f7c97e43
+5 -1
View File
@@ -981,7 +981,11 @@ SPL_METHOD(SplFileInfo, getLinkTarget)
link = intern->file_name.s;
}
ret = readlink(link, buff, MAXPATHLEN-1);
#ifdef HAVE_SYMLINK
ret = readlink(intern->file_name, buff, MAXPATHLEN-1);
#else
ret = -1; /* always fail if not implemented */
#endif
if (ret == -1) {
zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Unable to read link %R, error: %s", intern->file_name_type, intern->file_name, strerror(errno));