]> source.dussan.org Git - nextcloud-server.git/commitdiff
Go back to updating mtime of shared folder to invoke a file cache rescan
authorMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 9 May 2012 20:20:38 +0000 (16:20 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 9 May 2012 20:20:38 +0000 (16:20 -0400)
apps/files_sharing/lib_share.php

index 77c55f37df6492e669baef3017ee7ac4d4299b00..ecf82abb31e35c3bf33f7c66ec542a9c47104081 100755 (executable)
@@ -98,11 +98,12 @@ class OC_Share {
                                        $uid = $uid."@".$gid;
                                }
                                $query->execute(array($uid_owner, $uid, $source, $target, $permissions));
-                               // Emit post_write hook to invoke a file cache rescan
+                               // Update mtime of shared folder to invoke a file cache rescan
                                $rootView=new OC_FilesystemView('/');
                                if (!$rootView->is_dir($sharedFolder)) {
                                        $rootView->mkdir($sharedFolder);
                                }
+                               $rootView->touch($sharedFolder);
                        }
                }
        }
@@ -390,8 +391,9 @@ class OC_Share {
                        }
                        foreach ($uid_shared_with as $uid) {
                                $sharedFolder = '/'.$uid.'/files/'.'Shared';
-                               // Emit post_write hook to invoke a file cache rescan
-                               OCP\Util::emitHook('OC_Filesystem', 'post_write', array('path' => $sharedFolder));
+                               // Update mtime of shared folder to invoke a file cache rescan
+                               $rootView=new OC_FilesystemView('/');
+                               $rootView->touch($sharedFolder);
                        }
                }
        }