]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid touch operation when unshare public link
authorBrice Maron <brice@bmaron.net>
Mon, 7 May 2012 22:37:18 +0000 (22:37 +0000)
committerBrice Maron <brice@bmaron.net>
Mon, 7 May 2012 22:37:18 +0000 (22:37 +0000)
apps/files_sharing/lib_share.php

index c2340bdc1814f2780a1cf55d8b44e113a961d2c3..b6346b97cf8b8a829502c5e9ff6d8f1adac67190 100755 (executable)
@@ -377,8 +377,10 @@ class OC_Share {
                $query = OCP\DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ? AND uid_shared_with ".self::getUsersAndGroups($uid_shared_with));
                $query->execute(array(strlen($source), $source, OCP\USER::getUser()));
                // Update mtime of shared folder to invoke a file cache rescan
-               $sharedFolder = '/'.$uid_shared_with.'/files/Shared';
-               OC_Filesystem::getStorage($sharedFolder)->touch($sharedFolder);
+               if ($uid_shared_with != self::PUBLICLINK) {
+                       $sharedFolder = '/'.$uid_shared_with.'/files/Shared';
+                       OC_Filesystem::getStorage($sharedFolder)->touch($sharedFolder);
+               }
        }
 
        /**