Actually fix shared webdav access
This commit is contained in:
parent
33d1906f23
commit
025d308929
1 changed files with 7 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue