Skip to content

Commit 3670423

Browse files
committed
Merge pull request laravel#558 from ProgerXP/patch-locks-dev
Fixing "Cannot remove ...: Permission denied" in File and bundle:: task
2 parents 45c9d15 + 5db3743 commit 3670423

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

laravel/cli/tasks/bundle/providers/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ protected function zipball($url, $bundle, $path)
5454

5555
File::rmdir($work.'zip');
5656

57+
$zip->close();
5758
@unlink($target);
5859
}
5960

laravel/file.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static function copy($path, $target)
9494

9595
/**
9696
* Extract the file extension from a file path.
97-
*
97+
*
9898
* @param string $path
9999
* @return string
100100
*/
@@ -273,8 +273,9 @@ public static function cpdir($source, $destination, $delete = false, $options =
273273
}
274274
}
275275

276-
if ($delete) rmdir($source);
277-
276+
unset($items);
277+
if ($delete) @rmdir($source);
278+
278279
return true;
279280
}
280281

@@ -306,6 +307,7 @@ public static function rmdir($directory, $preserve = false)
306307
}
307308
}
308309

310+
unset($items);
309311
if ( ! $preserve) @rmdir($directory);
310312
}
311313

0 commit comments

Comments
 (0)