Skip to content
Snippets Groups Projects
Commit bfaed9a8 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

Merge pull request #273 from owncloud/fix_webdav_shared_91

Return empty array if file does not exist inside Shared folder, fixes issue #91
parents bb40d14e 3d13c9db
No related branches found
No related tags found
No related merge requests found
...@@ -45,13 +45,16 @@ class OC_Files { ...@@ -45,13 +45,16 @@ class OC_Files {
if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) { if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) {
if ($path == '/Shared') { if ($path == '/Shared') {
list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
}else{ } else {
$info['size'] = OC_Filesystem::filesize($path); $info = array();
$info['mtime'] = OC_Filesystem::filemtime($path); if (OC_Filesystem::file_exists($path)) {
$info['ctime'] = OC_Filesystem::filectime($path); $info['size'] = OC_Filesystem::filesize($path);
$info['mimetype'] = OC_Filesystem::getMimeType($path); $info['mtime'] = OC_Filesystem::filemtime($path);
$info['encrypted'] = false; $info['ctime'] = OC_Filesystem::filectime($path);
$info['versioned'] = false; $info['mimetype'] = OC_Filesystem::getMimeType($path);
$info['encrypted'] = false;
$info['versioned'] = false;
}
} }
} else { } else {
$info = OC_FileCache::get($path); $info = OC_FileCache::get($path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment