fix creating the shared folder when the user home folder is not in the root mount

This commit is contained in:
Robin Appelman 2012-05-09 20:36:08 +02:00
parent 03f66c6351
commit 3e57e76c48
1 changed files with 3 additions and 6 deletions

View File

@ -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);
}
}
}