summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-05-09 16:20:38 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-05-09 16:20:38 -0400
commit2e826fa82a8a0ad12b411ca264b77ee29d44f77d (patch)
tree3c54e83405c867e2f38aecb31ae976666e818872 /apps/files_sharing
parent3e57e76c48315d3098df4eee4ed19ad30ee2688f (diff)
downloadnextcloud-server-2e826fa82a8a0ad12b411ca264b77ee29d44f77d.tar.gz
nextcloud-server-2e826fa82a8a0ad12b411ca264b77ee29d44f77d.zip
Go back to updating mtime of shared folder to invoke a file cache rescan
Diffstat (limited to 'apps/files_sharing')
-rwxr-xr-xapps/files_sharing/lib_share.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index 77c55f37df6..ecf82abb31e 100755
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -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);
}
}
}