66 * @author Christoph Wurst <christoph@winzerhof-wurst.at> 
77 * @author Joas Schilling <coding@schilljs.com> 
88 * @author Julius Härtl <jus@bitgrid.net> 
9+  * @author Richard Steinmetz <richard@steinmetz.cloud> 
910 * 
1011 * @license GNU AGPL version 3 or any later version 
1112 * 
2627namespace  OCA \WorkflowEngine \Check ;
2728
2829use  OCA \Files_Sharing \SharedStorage ;
30+ use  OCA \GroupFolders \Mount \GroupFolderStorage ;
2931use  OCA \WorkflowEngine \Entity \File ;
3032use  OCP \Files \Cache \ICache ;
3133use  OCP \Files \IHomeStorage ;
@@ -131,8 +133,11 @@ protected function getSystemTags() {
131133	 * @return int[] 
132134	 */ 
133135	protected  function  getFileIds (ICache $ cache$ path$ isExternalStorage
136+ 		// Do not cache file ids inside group folders because multiple file ids might be mapped to 
137+ 		// the same combination of cache id + path. 
138+ 		$ shouldCacheFileIds$ this storage ->instanceOfStorage (GroupFolderStorage::class);
134139		$ cacheId$ cachegetNumericStorageId ();
135- 		if  (isset ($ this fileIds [$ cacheId$ path
140+ 		if  ($ shouldCacheFileIds  &&  isset ($ this fileIds [$ cacheId$ path
136141			return  $ this fileIds [$ cacheId$ path
137142		}
138143
@@ -148,7 +153,9 @@ protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
148153			$ parentIds$ cachegetId ($ path
149154		}
150155
151- 		$ this fileIds [$ cacheId$ path$ parentIds
156+ 		if  ($ shouldCacheFileIds
157+ 			$ this fileIds [$ cacheId$ path$ parentIds
158+ 		}
152159
153160		return  $ parentIds
154161	}
0 commit comments