File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,28 @@ public function transfer(
155155 );
156156 $ sizeDifference = $ sourceSize - $ view ->getFileInfo ($ finalTarget )->getSize ();
157157
158+ // Files in Team folders are not transferred, so their size needs to be subtracted to avoid warnings about size differences
159+ $ mounts = Server::get (IMountManager::class)->getAll ();
160+ foreach ($ mounts as $ mount ) {
161+ if (!$ mount instanceof GroupMountPoint || !str_starts_with ($ mount ->getMountPoint (), '/ ' . $ sourcePath . '/ ' )) {
162+ continue ;
163+ }
164+
165+ $ storage = $ mount ->getStorage ();
166+ if ($ storage === null ) {
167+ $ output ->writeln ('Failed to get storage for mount: ' . $ mount ->getMountPoint ());
168+ continue ;
169+ }
170+
171+ $ rootCacheEntry = $ storage ->getCache ()->get ('' );
172+ if ($ rootCacheEntry === false ) {
173+ $ output ->writeln ('Failed to get root cache entry for storage: ' . $ mount ->getMountPoint ());
174+ continue ;
175+ }
176+
177+ $ sizeDifference -= $ rootCacheEntry ->getSize ();
178+ }
179+
158180 // transfer the incoming shares
159181 $ sourceShares = $ this ->collectIncomingShares (
160182 $ sourceUid ,
You can’t perform that action at this time.
0 commit comments