diff --git a/laravel/cli/tasks/bundle/providers/provider.php b/laravel/cli/tasks/bundle/providers/provider.php index bdf3b8ced0c..bf6401f71a0 100644 --- a/laravel/cli/tasks/bundle/providers/provider.php +++ b/laravel/cli/tasks/bundle/providers/provider.php @@ -54,6 +54,7 @@ protected function zipball($url, $bundle, $path) File::rmdir($work.'zip'); + $zip->close(); @unlink($target); } diff --git a/laravel/file.php b/laravel/file.php index 0346c83c71d..1cb33c00547 100644 --- a/laravel/file.php +++ b/laravel/file.php @@ -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); }