summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/ftp.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-21 22:04:45 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-21 22:04:45 +0200
commit33cabcf590401763609570a86f7bc7540dbf1fc5 (patch)
treec20f0fc3ba4dd4fdc0f9f2c04f040aa1d4d1ee8b /apps/files_external/lib/ftp.php
parent5217ca219a380c1ae8c6cdc56b83ceeb055edf15 (diff)
downloadnextcloud-server-33cabcf590401763609570a86f7bc7540dbf1fc5.tar.gz
nextcloud-server-33cabcf590401763609570a86f7bc7540dbf1fc5.zip
postpone the cost of setting up some of the external storage backends untill we actually need it
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);