Fix resolve path
This commit is contained in:
parent
92abb5f23d
commit
c98fef8a51
|
@ -45,8 +45,7 @@ class SharedScanner extends Scanner {
|
|||
if ($data === null) {
|
||||
return null;
|
||||
}
|
||||
$sourcePath = '/' . $this->storage->getOwner($path) . '/' . $this->storage->getSourcePath($path);
|
||||
list($sourceStorage, $internalPath) = \OC\Files\Filesystem::resolvePath($sourcePath);
|
||||
list($sourceStorage, $internalPath) = $this->storage->resolvePath($path);
|
||||
$data['permissions'] = $sourceStorage->getPermissions($internalPath);
|
||||
return $data;
|
||||
}
|
||||
|
|
|
@ -349,17 +349,6 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the path for the source of the share
|
||||
*
|
||||
* @param string $path
|
||||
* @return array
|
||||
*/
|
||||
public function resolvePath($path) {
|
||||
$source = '/' . $this->newShare->getShareOwner() . '/' . $this->getSourcePath($path);
|
||||
return \OC\Files\Filesystem::resolvePath($source);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
|
||||
|
|
|
@ -451,8 +451,13 @@ class Jail extends Wrapper {
|
|||
$this->storage->changeLock($this->getSourcePath($path), $type, $provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the path for the source of the share
|
||||
*
|
||||
* @param string $path
|
||||
* @return array
|
||||
*/
|
||||
public function resolvePath($path) {
|
||||
$path = $this->getSourcePath($path);
|
||||
return \OC\Files\Filesystem::resolvePath($path);
|
||||
return [$this->storage, $this->getSourcePath($path)];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue