Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-11-06 02:54:23 +0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-11-06 02:54:23 +0400
commit3d13c9db700522854a2fd6e4af624b921f062c8f (patch)
treece059c9522f81b6318f103496f93970262b8fa87 /lib/files.php
parentb7e9d8d00e08faa16d67e7469ef5af94dbca7cfc (diff)
Return empty array if file does not exist inside Shared folder, fixes issue #91
Diffstat (limited to 'lib/files.php')
-rw-r--r--lib/files.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/files.php b/lib/files.php
index 5a14083c285..3e15c68d885 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -45,13 +45,16 @@ class OC_Files {
if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) {
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 = array();
+ if (OC_Filesystem::file_exists($path)) {
+ $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);