summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorHenrik Kjölhede <hkjolhede@gmail.com>2013-02-10 13:11:29 +0100
committerHenrik Kjölhede <hkjolhede@gmail.com>2013-02-10 13:11:29 +0100
commit421bacc33ac1625a920e71cbb065894ee39ed930 (patch)
treebd21b213c6783ad05bc45c4c4e1701c6f9d25f5b /apps/files_external
parent1df8a5a774ae5d665849daf74540d967826d5e11 (diff)
downloadnextcloud-server-421bacc33ac1625a920e71cbb065894ee39ed930.tar.gz
nextcloud-server-421bacc33ac1625a920e71cbb065894ee39ed930.zip
Final changes from icewind1991
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/sftp.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 8a4373132e2..551a5a64ef2 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -49,6 +49,10 @@ class SFTP extends \OC\Files\Storage\Common {
$host_keys[$this->host] = $current_host_key;
$this->write_host_keys($host_keys);
}
+
+ if(!$this->file_exists('')){
+ $this->mkdir('');
+ }
}
public function test() {
@@ -56,6 +60,10 @@ class SFTP extends \OC\Files\Storage\Common {
throw new \Exception("Required parameters not set");
}
}
+
+ public function getId(){
+ return 'sftp::' . $this->user . '@' . $this->host . '/' . $this->root;
+ }
private function abs_path($path) {
return $this->root . $this->cleanPath($path);