Fix permission for movable storage root
This commit is contained in:
parent
3ed4e5b26b
commit
0532f5c39a
1 changed files with 8 additions and 5 deletions
|
@ -836,11 +836,10 @@ class View {
|
|||
return $data;
|
||||
}
|
||||
$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
|
||||
/**
|
||||
* @var \OC\Files\Storage\Storage $storage
|
||||
* @var string $internalPath
|
||||
*/
|
||||
list($storage, $internalPath) = Filesystem::resolvePath($path);
|
||||
|
||||
$mount = Filesystem::getMountManager()->find($path);
|
||||
$storage = $mount->getStorage();
|
||||
$internalPath = $mount->getInternalPath($path);
|
||||
$data = null;
|
||||
if ($storage) {
|
||||
$cache = $storage->getCache($internalPath);
|
||||
|
@ -888,6 +887,10 @@ class View {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($mount instanceof MoveableMount) {
|
||||
$data['permissions'] |= \OCP\PERMISSION_DELETE | \OCP\PERMISSION_UPDATE;
|
||||
}
|
||||
|
||||
$data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
|
||||
|
||||
return new FileInfo($path, $storage, $internalPath, $data);
|
||||
|
|
Loading…
Reference in a new issue