From 025d308929263723887c271cf748bd4e5c71697c Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Mon, 8 Oct 2012 17:21:52 -0400 Subject: [PATCH] Actually fix shared webdav access --- lib/files.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/lib/files.php b/lib/files.php index ad716115dc7..47583cf6dbf 100644 --- a/lib/files.php +++ b/lib/files.php @@ -43,22 +43,13 @@ class OC_Files { */ public static function getFileInfo($path) { if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) { - if ($path == '/Shared') { - $info = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); - } - else { - $pos = strpos($path, '/', 8); - // Get shared folder name - if ($pos !== false) { - $itemTarget = substr($path, 7, $pos - 7); - } else { - $itemTarget = substr($path, 7); - } - $info = OCP\Share::getItemSharedWith('file', $itemTarget, OC_Share_Backend_File::FORMAT_FILE_APP, array('folder' => $path)); - } - $info = $info[0]; - } - 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); } return $info; -- 2.39.5