|
|
|
@ -127,8 +127,13 @@ class FileSystemTags implements ICheck, IFileCheck {
|
|
|
|
|
* @return int[]
|
|
|
|
|
*/
|
|
|
|
|
protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
|
|
|
|
|
// TODO: Fix caching inside group folders
|
|
|
|
|
// Do not cache file ids inside group folders because multiple file ids might be mapped to
|
|
|
|
|
// the same combination of cache id + path.
|
|
|
|
|
$shouldCacheFileIds = !$this->storage
|
|
|
|
|
->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
|
|
|
|
|
$cacheId = $cache->getNumericStorageId();
|
|
|
|
|
if (isset($this->fileIds[$cacheId][$path])) {
|
|
|
|
|
if ($shouldCacheFileIds && isset($this->fileIds[$cacheId][$path])) {
|
|
|
|
|
return $this->fileIds[$cacheId][$path];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -144,7 +149,9 @@ class FileSystemTags implements ICheck, IFileCheck {
|
|
|
|
|
$parentIds[] = $cache->getId($path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->fileIds[$cacheId][$path] = $parentIds;
|
|
|
|
|
if ($shouldCacheFileIds) {
|
|
|
|
|
$this->fileIds[$cacheId][$path] = $parentIds;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $parentIds;
|
|
|
|
|
}
|
|
|
|
|