summaryrefslogtreecommitdiffstats
path: root/lib/private/connector
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-04 07:48:37 -0800
committerVincent Petry <pvince81@owncloud.com>2014-02-04 07:48:37 -0800
commitbd6734291cd56b4d3d494a6e4138435ecb49171e (patch)
treed6c11616922731150d6777e637c98bbb161bdd4a /lib/private/connector
parent3c8007180715b75d2b1a6597f31eeda1770b8762 (diff)
parent5ad28f4d1ff952c17f3ca13c8ea7e2e118965846 (diff)
downloadnextcloud-server-bd6734291cd56b4d3d494a6e4138435ecb49171e.tar.gz
nextcloud-server-bd6734291cd56b4d3d494a6e4138435ecb49171e.zip
Merge pull request #6081 from owncloud/partfilewebdavfix
Allow getting info or renaming part files through WebDAV
Diffstat (limited to 'lib/private/connector')
-rw-r--r--lib/private/connector/sabre/objecttree.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index cd3f081f7cc..d1e179af2ec 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -38,7 +38,20 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
return $this->rootNode;
}
- $info = $this->getFileView()->getFileInfo($path);
+ if (pathinfo($path, PATHINFO_EXTENSION) === 'part') {
+ // read from storage
+ $absPath = $this->getFileView()->getAbsolutePath($path);
+ list($storage, $internalPath) = Filesystem::resolvePath('/' . $absPath);
+ if ($storage) {
+ $scanner = $storage->getScanner($internalPath);
+ // get data directly
+ $info = $scanner->getData($internalPath);
+ }
+ }
+ else {
+ // read from cache
+ $info = $this->getFileView()->getFileInfo($path);
+ }
if (!$info) {
throw new \Sabre_DAV_Exception_NotFound('File with name ' . $path . ' could not be located');