diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-08 23:37:50 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-08 23:37:50 +0200 |
commit | 035d83fe91aec5580c5b62b703a324b506e5c9b7 (patch) | |
tree | 6be46a5cc28145e8f674137810c0704b8d52d2b5 /lib/files.php | |
parent | 025d308929263723887c271cf748bd4e5c71697c (diff) | |
download | nextcloud-server-035d83fe91aec5580c5b62b703a324b506e5c9b7.tar.gz nextcloud-server-035d83fe91aec5580c5b62b703a324b506e5c9b7.zip |
don't use the workaround for shared files on the /Shared folder
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/files.php b/lib/files.php index 47583cf6dbf..2b2b8b42dc4 100644 --- a/lib/files.php +++ b/lib/files.php @@ -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); } |