From 1324ba368c93ab997eb36d6900686000d0d5e242 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 16 Feb 2012 14:35:32 -0600 Subject: [PATCH] tweak provider to use temp directory to avoid latest confusions. --- laravel/cli/tasks/bundle/providers/provider.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/laravel/cli/tasks/bundle/providers/provider.php b/laravel/cli/tasks/bundle/providers/provider.php index 13bce79e..bdf3b8ce 100644 --- a/laravel/cli/tasks/bundle/providers/provider.php +++ b/laravel/cli/tasks/bundle/providers/provider.php @@ -39,9 +39,11 @@ abstract class Provider { // Once we have the Zip archive, we can open it and extract it // into the working directory. By convention, we expect the // archive to contain one root directory with the bundle. - $zip->extractTo($work); + mkdir($work.'zip'); - $latest = File::latest($work)->getRealPath(); + $zip->extractTo($work.'zip'); + + $latest = File::latest($work.'zip')->getRealPath(); @chmod($latest, 0777); @@ -50,6 +52,8 @@ abstract class Provider { // so the bundle will be usable by the develoepr. File::mvdir($latest, $path); + File::rmdir($work.'zip'); + @unlink($target); }