Commit 28077fa5 authored by alexpott's avatar alexpott

Issue #2099671 by salvis: Fixed Windows 7 and MTimeProtectedFileStorage has problems.

parent 1402c663
......@@ -133,8 +133,8 @@ public function deleteAll() {
*/
protected function unlink($path) {
if (file_exists($path)) {
// Ensure the file / folder is writable.
if (is_dir($path)) {
// Ensure the folder is writable.
@chmod($path, 0777);
foreach (new \DirectoryIterator($path) as $fileinfo) {
if (!$fileinfo->isDot()) {
......@@ -143,6 +143,8 @@ protected function unlink($path) {
}
return @rmdir($path);
}
// Windows needs the file to be writable.
@chmod($path, 0700);
return @unlink($path);
}
// If there's nothing to delete return TRUE anyway.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment