]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix creating the shared folder when the user home folder is not in the root mount
authorRobin Appelman <icewind@owncloud.com>
Wed, 9 May 2012 18:36:08 +0000 (20:36 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 9 May 2012 18:36:08 +0000 (20:36 +0200)
apps/files_sharing/lib_share.php

index b9542fb659e46b3a6cf2ead1d4ae215055c33acb..77c55f37df6492e669baef3017ee7ac4d4299b00 100755 (executable)
@@ -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);
                                }
                        }
                }