summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib_share.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-05-09 20:36:08 +0200
committerRobin Appelman <icewind@owncloud.com>2012-05-09 20:36:08 +0200
commit3e57e76c48315d3098df4eee4ed19ad30ee2688f (patch)
tree93565303d40358f363e48f63a743a6fe8140f3bc /apps/files_sharing/lib_share.php
parent03f66c6351471319fa0a06b8a8bbd7bfe82ed5c2 (diff)
downloadnextcloud-server-3e57e76c48315d3098df4eee4ed19ad30ee2688f.tar.gz
nextcloud-server-3e57e76c48315d3098df4eee4ed19ad30ee2688f.zip
fix creating the shared folder when the user home folder is not in the root mount
Diffstat (limited to 'apps/files_sharing/lib_share.php')
-rwxr-xr-xapps/files_sharing/lib_share.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index b9542fb659e..77c55f37df6 100755
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -99,12 +99,9 @@ class OC_Share {
}
$query->execute(array($uid_owner, $uid, $source, $target, $permissions));
// Emit post_write hook to invoke a file cache rescan
- $storage = OC_Filesystem::getStorage($sharedFolder);
- if (!$storage->is_dir($sharedFolder)) {
- $storage->mkdir($sharedFolder);
- OCP\Util::emitHook('OC_Filesystem', 'post_write', array('path' => $sharedFolder));
- } else {
- OCP\Util::emitHook('OC_Filesystem', 'post_write', array('path' => $target));
+ $rootView=new OC_FilesystemView('/');
+ if (!$rootView->is_dir($sharedFolder)) {
+ $rootView->mkdir($sharedFolder);
}
}
}