Merge pull request #558 from ProgerXP/patch-locks-dev
Fixing "Cannot remove ...: Permission denied" in File and bundle:: task
This commit is contained in:
commit
3670423da6
|
@ -54,6 +54,7 @@ protected function zipball($url, $bundle, $path)
|
|||
|
||||
File::rmdir($work.'zip');
|
||||
|
||||
$zip->close();
|
||||
@unlink($target);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public static function copy($path, $target)
|
|||
|
||||
/**
|
||||
* Extract the file extension from a file path.
|
||||
*
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
|
@ -273,8 +273,9 @@ public static function cpdir($source, $destination, $delete = false, $options =
|
|||
}
|
||||
}
|
||||
|
||||
if ($delete) rmdir($source);
|
||||
|
||||
unset($items);
|
||||
if ($delete) @rmdir($source);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -306,6 +307,7 @@ public static function rmdir($directory, $preserve = false)
|
|||
}
|
||||
}
|
||||
|
||||
unset($items);
|
||||
if ( ! $preserve) @rmdir($directory);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue