Skip to content
Snippets Groups Projects
Commit 3d13c9db authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Return empty array if file does not exist inside Shared folder, fixes issue #91

parent b7e9d8d0
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,8 @@ class OC_Files { ...@@ -46,6 +46,8 @@ class OC_Files {
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 = array();
if (OC_Filesystem::file_exists($path)) {
$info['size'] = OC_Filesystem::filesize($path); $info['size'] = OC_Filesystem::filesize($path);
$info['mtime'] = OC_Filesystem::filemtime($path); $info['mtime'] = OC_Filesystem::filemtime($path);
$info['ctime'] = OC_Filesystem::filectime($path); $info['ctime'] = OC_Filesystem::filectime($path);
...@@ -53,6 +55,7 @@ class OC_Files { ...@@ -53,6 +55,7 @@ class OC_Files {
$info['encrypted'] = false; $info['encrypted'] = false;
$info['versioned'] = 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.
Please register or to comment