When mounting an ownCloud (backend OC) inside another ownCloud (frontend
OC), the frontend OC will use WebDAV to upload file, which will create
part files. These part files need to be accessible for the frontend OC
to rename them to the actual file name.
This fix leaves the file cache untouched but gives direct access to part
file info when requested.
This means that part file can be accessed only when their path and name
are known. These won't appear in file listtings.
Fixes #6068
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');