Fix correctFolders and retrieve the correct storage cache
This commit is contained in:
parent
02e2f7384e
commit
e743386acf
|
@ -42,10 +42,12 @@ class Shared_Cache extends Cache {
|
|||
*/
|
||||
private function getSourceCache($target) {
|
||||
$source = \OC_Share_Backend_File::getSource($target);
|
||||
if (isset($source['path'])) {
|
||||
$source['path'] = '/' . $source['uid_owner'] . '/' . $source['path'];
|
||||
\OC\Files\Filesystem::initMountPoints($source['uid_owner']);
|
||||
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source['path']);
|
||||
if (isset($source['path']) && isset($source['fileOwner'])) {
|
||||
\OC\Files\Filesystem::initMountPoints($source['fileOwner']);
|
||||
$mount = \OC\Files\Mount::findByNumericId($source['storage']);
|
||||
if ($mount) {
|
||||
$fullPath = $mount->getMountPoint().$source['path'];
|
||||
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($fullPath);
|
||||
if ($storage) {
|
||||
$this->files[$target] = $internalPath;
|
||||
$cache = $storage->getCache();
|
||||
|
@ -54,6 +56,7 @@ class Shared_Cache extends Cache {
|
|||
return $cache;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,11 @@ class Shared_Updater {
|
|||
while (!empty($users)) {
|
||||
$reshareUsers = array();
|
||||
foreach ($users as $user) {
|
||||
// The ETag of the logged in user should already be updated
|
||||
if ($user !== $uid) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
|
||||
}
|
||||
}
|
||||
$users = $reshareUsers;
|
||||
}
|
||||
// Correct folders of shared file owner
|
||||
|
|
Loading…
Reference in New Issue