Fixing "Cannot remove ...: Permission denied" in File and bundle:: task
Signed-off-by: Pavel <proger.xp@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class File {
|
||||
|
||||
/**
|
||||
* Extract the file extension from a file path.
|
||||
*
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
@@ -273,8 +273,9 @@ class File {
|
||||
}
|
||||
}
|
||||
|
||||
if ($delete) rmdir($source);
|
||||
|
||||
unset($items);
|
||||
if ($delete) @rmdir($source);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -306,6 +307,7 @@ class File {
|
||||
}
|
||||
}
|
||||
|
||||
unset($items);
|
||||
if ( ! $preserve) @rmdir($directory);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user