BUG Allow Windows paths in FileWriteableCheck

This commit is contained in:
Ingo Schommer 2013-01-28 14:38:56 +01:00
parent 0050c843d1
commit e5d8df0c7e
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ class FileWriteableCheck implements EnvironmentCheck {
}
function check() {
if($this->path[0] == '/') $filename = $this->path;
// Check for absolute paths (either by leading slash, or by directory existence for Win compat)
if($this->path[0] == '/' || file_exists($this->path)) $filename = $this->path;
else $filename = BASE_PATH . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $this->path);
if(file_exists($filename)) $isWriteable = is_writeable($filename);