aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/ftp.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/ftp.php')
-rw-r--r--apps/files_external/lib/ftp.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index dea44728f3c..e76eca0be38 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -50,6 +50,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
return $url;
}
public function fopen($path,$mode) {
+ $this->init();
switch($mode) {
case 'r':
case 'rb':
@@ -86,6 +87,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
}
public function writeBack($tmpFile) {
+ $this->init();
if(isset(self::$tempFiles[$tmpFile])) {
$this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]);
unlink($tmpFile);