Skip to content
Snippets Groups Projects
Commit 2e826fa8 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Go back to updating mtime of shared folder to invoke a file cache rescan

parent 3e57e76c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment