Fixed issue 467, exception when deleting an orphan git repo.
This commit is contained in:
parent
89780b0317
commit
430c9cb00e
2
AUTHORS
2
AUTHORS
@ -23,6 +23,8 @@ Much appreciated contributors:
|
|||||||
Ludovic Bellière
|
Ludovic Bellière
|
||||||
Brian Armstrong
|
Brian Armstrong
|
||||||
Raphaël Emourgeon
|
Raphaël Emourgeon
|
||||||
|
Jakub Viták
|
||||||
|
Vladimir Solomatin
|
||||||
|
|
||||||
And all the nice users who spent time reporting issues and promoting
|
And all the nice users who spent time reporting issues and promoting
|
||||||
the project. The project could not live without them.
|
the project. The project could not live without them.
|
||||||
|
@ -99,6 +99,7 @@ class IDF_Plugin_SyncGit_Cron
|
|||||||
if (count($orphans)) {
|
if (count($orphans)) {
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'rm -rf '.implode(' ', $orphans);
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'rm -rf '.implode(' ', $orphans);
|
||||||
exec($cmd);
|
exec($cmd);
|
||||||
|
clearstatcache();
|
||||||
while (list(, $project) = each($orphans)) {
|
while (list(, $project) = each($orphans)) {
|
||||||
if (is_dir($project)) {
|
if (is_dir($project)) {
|
||||||
throw new Exception(sprintf('Cannot remove %s directory.', $project));
|
throw new Exception(sprintf('Cannot remove %s directory.', $project));
|
||||||
|
Loading…
Reference in New Issue
Block a user