]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update to conform to API changes
authorHenrik Kjölhede <hkjolhede@gmail.com>
Sat, 9 Feb 2013 18:08:39 +0000 (19:08 +0100)
committerHenrik Kjölhede <hkjolhede@gmail.com>
Sat, 9 Feb 2013 18:08:39 +0000 (19:08 +0100)
apps/files_external/lib/sftp.php

index 883b3ab643da7c0b9245703a544213e71d7645c1..0b461fe7f4b054c2ce88a4158f4d99686b31e4cc 100644 (file)
@@ -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);
                                        }