]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't use the workaround for shared files on the /Shared folder
authorRobin Appelman <icewind@owncloud.com>
Mon, 8 Oct 2012 21:37:50 +0000 (23:37 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 8 Oct 2012 21:37:50 +0000 (23:37 +0200)
lib/files.php

index 47583cf6dbf404cd8cdf01053b0eaf107369e0b7..2b2b8b42dc41360a4b5ef72e942ef92c7dc748e5 100644 (file)
@@ -43,12 +43,16 @@ class OC_Files {
         */
        public static function getFileInfo($path) {
                if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) {
-                       $info['size'] = OC_Filesystem::filesize($path);
-                       $info['mtime'] = OC_Filesystem::filemtime($path);
-                       $info['ctime'] = OC_Filesystem::filectime($path);
-                       $info['mimetype'] = OC_Filesystem::getMimeType($path);
-                       $info['encrypted'] = false;
-                       $info['versioned'] = false;
+                       if ($path == '/Shared') {
+                               list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
+                       }else{
+                               $info['size'] = OC_Filesystem::filesize($path);
+                               $info['mtime'] = OC_Filesystem::filemtime($path);
+                               $info['ctime'] = OC_Filesystem::filectime($path);
+                               $info['mimetype'] = OC_Filesystem::getMimeType($path);
+                               $info['encrypted'] = false;
+                               $info['versioned'] = false;
+                       }
                } else {
                        $info = OC_FileCache::get($path);
                }