]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only call mkdir() if the root folder does not exist for FTP external storage
authorMichael Gapczynski <mtgap@owncloud.com>
Fri, 27 Jul 2012 16:32:03 +0000 (12:32 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Mon, 30 Jul 2012 14:07:19 +0000 (10:07 -0400)
apps/files_external/lib/ftp.php

index 4d5ae670de59c2ff341671e15365f8362d621795..63f14a28777c294c08c65c9c9ea0cba4fa6577f7 100644 (file)
@@ -24,9 +24,10 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
                if(!$this->root || $this->root[0]!='/'){
                        $this->root='/'.$this->root;
                }
-               
                //create the root folder if necesary
-               mkdir($this->constructUrl(''));
+               if (!$this->is_dir('')) {
+                       $this->mkdir('');
+               }
        }
 
        /**