From: Michael Gapczynski Date: Fri, 27 Jul 2012 16:32:03 +0000 (-0400) Subject: Only call mkdir() if the root folder does not exist for FTP external storage X-Git-Tag: v4.0.6~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f378415377a4afc44a55f4aedec3dfefc87ad890;p=nextcloud-server.git Only call mkdir() if the root folder does not exist for FTP external storage --- diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 4d5ae670de5..63f14a28777 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -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(''); + } } /**