Update to conform to API changes
This commit is contained in:
parent
3b029d551c
commit
96cfe37587
|
@ -132,12 +132,13 @@ class SFTP extends OC\Files\Storage\Common {
|
||||||
$list = $this->client->nlist($this->abs_path($path));
|
$list = $this->client->nlist($this->abs_path($path));
|
||||||
|
|
||||||
$id = md5('sftp:' . $path);
|
$id = md5('sftp:' . $path);
|
||||||
OC_FakeDirStream::$dirs[$id] = array();
|
$dir_stream = array();
|
||||||
foreach($list as $file) {
|
foreach($list as $file) {
|
||||||
if ($file != '.' && $file != '..') {
|
if ($file != '.' && $file != '..') {
|
||||||
OC_FakeDirStream::$dirs[$id][] = $file;
|
$dir_stream[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
\OC\Files\Stream\Dir::register($id, $dir_stream);
|
||||||
return opendir('fakedir://' . $id);
|
return opendir('fakedir://' . $id);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -212,7 +213,7 @@ class SFTP extends OC\Files\Storage\Common {
|
||||||
$ext='';
|
$ext='';
|
||||||
}
|
}
|
||||||
$tmpFile=OC_Helper::tmpFile($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)) {
|
if ($this->file_exists($path)) {
|
||||||
$this->getFile($abs_path, $tmpFile);
|
$this->getFile($abs_path, $tmpFile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue