mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
BUG Allow Windows paths in FileWriteableCheck
This commit is contained in:
parent
0050c843d1
commit
e5d8df0c7e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user