diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-12-16 14:24:48 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-12-17 14:03:50 +0100 |
commit | fd854247423de0d74b05b44bf16572d2be943819 (patch) | |
tree | 9c51dd102bc2f5f318e6081a23e93dd1164b6548 /lib/private/connector | |
parent | 95a145f67f037d5b91ecebc33deaefbb4af96a79 (diff) | |
download | nextcloud-server-fd854247423de0d74b05b44bf16572d2be943819.tar.gz nextcloud-server-fd854247423de0d74b05b44bf16572d2be943819.zip |
Add getMountPoint to FileInfo
Diffstat (limited to 'lib/private/connector')
-rw-r--r-- | lib/private/connector/sabre/directory.php | 2 | ||||
-rw-r--r-- | lib/private/connector/sabre/objecttree.php | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php index ec5f82f9daa..bbe0f3452a7 100644 --- a/lib/private/connector/sabre/directory.php +++ b/lib/private/connector/sabre/directory.php @@ -72,7 +72,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node $path = $this->fileView->getAbsolutePath($this->path) . '/' . $name; // using a dummy FileInfo is acceptable here since it will be refreshed after the put is complete - $info = new \OC\Files\FileInfo($path, null, null, array()); + $info = new \OC\Files\FileInfo($path, null, null, array(), null); $node = new OC_Connector_Sabre_File($this->fileView, $info); return $node->put($data); } catch (\OCP\Files\StorageNotAvailableException $e) { diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php index 14a55b5cada..d2759d7a3ba 100644 --- a/lib/private/connector/sabre/objecttree.php +++ b/lib/private/connector/sabre/objecttree.php @@ -71,7 +71,9 @@ class ObjectTree extends \Sabre\DAV\ObjectTree { if (pathinfo($path, PATHINFO_EXTENSION) === 'part') { // read from storage $absPath = $this->fileView->getAbsolutePath($path); - list($storage, $internalPath) = Filesystem::resolvePath('/' . $absPath); + $mount = $this->fileView->getMount($path); + $storage = $mount->getStorage(); + $internalPath = $mount->getInternalPath($absPath); if ($storage) { /** * @var \OC\Files\Storage\Storage $storage @@ -79,7 +81,7 @@ class ObjectTree extends \Sabre\DAV\ObjectTree { $scanner = $storage->getScanner($internalPath); // get data directly $data = $scanner->getData($internalPath); - $info = new FileInfo($absPath, $storage, $internalPath, $data); + $info = new FileInfo($absPath, $storage, $internalPath, $data, $mount); } else { $info = null; } |