Skip to content
Snippets Groups Projects
Commit bd673429 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #6081 from owncloud/partfilewebdavfix

Allow getting info or renaming part files through WebDAV
parents 3c800718 5ad28f4d
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment