From f378415377a4afc44a55f4aedec3dfefc87ad890 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 27 Jul 2012 12:32:03 -0400 Subject: [PATCH] Only call mkdir() if the root folder does not exist for FTP external storage --- apps/files_external/lib/ftp.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 4d5ae670de..63f14a2877 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(''); + } } /**