diff options
author | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-02-09 19:08:39 +0100 |
---|---|---|
committer | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-02-09 19:08:39 +0100 |
commit | 96cfe375871a6ea24265183f76322e3fabcbd4d7 (patch) | |
tree | d0dece2436402133d3258854198f9aea456994cf /apps/files_external/lib/sftp.php | |
parent | 3b029d551c3fb3ec1eb4c4ea4e6909ede5d6de2a (diff) | |
download | nextcloud-server-96cfe375871a6ea24265183f76322e3fabcbd4d7.tar.gz nextcloud-server-96cfe375871a6ea24265183f76322e3fabcbd4d7.zip |
Update to conform to API changes
Diffstat (limited to 'apps/files_external/lib/sftp.php')
-rw-r--r-- | apps/files_external/lib/sftp.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 883b3ab643d..0b461fe7f4b 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -132,12 +132,13 @@ class SFTP extends OC\Files\Storage\Common { $list = $this->client->nlist($this->abs_path($path)); $id = md5('sftp:' . $path); - OC_FakeDirStream::$dirs[$id] = array(); + $dir_stream = array(); foreach($list as $file) { if ($file != '.' && $file != '..') { - OC_FakeDirStream::$dirs[$id][] = $file; + $dir_stream[] = $file; } } + \OC\Files\Stream\Dir::register($id, $dir_stream); return opendir('fakedir://' . $id); } catch(Exception $e) { return false; @@ -212,7 +213,7 @@ class SFTP extends OC\Files\Storage\Common { $ext=''; } $tmpFile=OC_Helper::tmpFile($ext); - OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); + \OC\Files\Stream\Close::registerCallback($tmpFile], array($this, 'writeBack')); if ($this->file_exists($path)) { $this->getFile($abs_path, $tmpFile); } |