OSDN Git Service

- fixed bug directory creation fails when you specify non-existent directory with...
authorYoshinari Takaoka <mumumu@mumumu.org>
Sun, 19 Jul 2009 17:02:13 +0000 (02:02 +0900)
committerYoshinari Takaoka <mumumu@mumumu.org>
Sun, 19 Jul 2009 17:02:13 +0000 (02:02 +0900)
class/Plugin/Handle/AddProject.php

index 49d8098..4242bed 100644 (file)
@@ -44,7 +44,11 @@ class Ethna_Plugin_Handle_AddProject extends Ethna_Plugin_Handle
 
         // basedir
         if (isset($opt_list['basedir'])) {
-            $basedir = realpath(end($opt_list['basedir']));
+            $dir = end($opt_list['basedir']);
+            $basedir = realpath($dir);
+            if ($basedir === false) {  //  e.x file does not exist
+                $basedir = $dir;
+            }
         } else {
             $basedir = sprintf("%s/%s", getcwd(), strtolower($app_id));
         }