]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix incorrect creation of filesystem for user@group in data folder during shares
authorMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 13 Jun 2012 01:33:05 +0000 (21:33 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 13 Jun 2012 01:34:35 +0000 (21:34 -0400)
apps/files_sharing/lib_share.php

index cf5456d7042f39be6ca0b6719eac850537e5f859..356c958b6ceba36ae021522943bd0fc917c1a501 100644 (file)
@@ -104,10 +104,6 @@ class OC_Share {
                                                $counter++;
                                        }
                                }
-                               if (isset($gid)) {
-                                       $uid = $uid."@".$gid;
-                               }
-                               $query->execute(array($uid_owner, $uid, $source, $target, $permissions));
                                // Update mtime of shared folder to invoke a file cache rescan
                                $rootView=new OC_FilesystemView('/');
                                if (!$rootView->is_dir($sharedFolder)) {
@@ -119,6 +115,10 @@ class OC_Share {
                                        $rootView->mkdir($sharedFolder);
                                }
                                $rootView->touch($sharedFolder);
+                               if (isset($gid)) {
+                                       $uid = $uid."@".$gid;
+                               }
+                               $query->execute(array($uid_owner, $uid, $source, $target, $permissions));
                        }
                }
        }