diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 8a4373132e..551a5a64ef 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);