diff --git a/core/src/plugins/access.ftp/class.ftpAccessDriver.php b/core/src/plugins/access.ftp/class.ftpAccessDriver.php index c10feca1da..8e8b1010c9 100644 --- a/core/src/plugins/access.ftp/class.ftpAccessDriver.php +++ b/core/src/plugins/access.ftp/class.ftpAccessDriver.php @@ -220,9 +220,18 @@ public function isWriteable($path, $type="dir") if ($type == "dir" && ($dir == "" || $dir == "/" || $dir == "\\")) { // ROOT, WE ARE NOT SURE TO BE ABLE TO READ THE PARENT return true; } else { + if (strtoupper(substr(PHP_OS, 0, 3)) === "WIN") { + return is_writable($path); + } else { + if (extension_loaded("posix")) { + posix_access($path, POSIX_W_OK); + return posix_get_last_error(); + } else { + return is_writable($path); + } + } return is_writable($path); } - } public function deldir($location)