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 <GapczynskiM@gmail.com>2012-01-01 23:04:16 +0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-01-01 23:04:16 +0400
commit64a24191a3880af5b8c574eb2482d479f9024677 (patch)
tree31e8734486fd9c88b75594c1657c9207093cea25 /apps/files_sharing
parenteb4cd869107d4afa1c259751e765ca39defb9279 (diff)
Fix return for empty Shared folder in opendir()
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/sharedstorage.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index d78e273bf38..b0eaeecf723 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -79,20 +79,16 @@ class OC_Filestorage_Shared extends OC_Filestorage {
if ($path == "" || $path == "/") {
$path = $this->datadir.$path;
$sharedItems = OC_Share::getItemsInFolder($path);
- if (empty($sharedItems)) {
- return false;
- } else {
- global $FAKEDIRS;
- $files = array();
- foreach ($sharedItems as $item) {
- // If item is in the root of the shared storage provider and the item exists add it to the fakedirs
- if (dirname($item['target'])."/" == $path && $this->file_exists(basename($item['target']))) {
- $files[] = basename($item['target']);
- }
+ global $FAKEDIRS;
+ $files = array();
+ foreach ($sharedItems as $item) {
+ // If item is in the root of the shared storage provider and the item exists add it to the fakedirs
+ if (dirname($item['target'])."/" == $path && $this->file_exists(basename($item['target']))) {
+ $files[] = basename($item['target']);
}
- $FAKEDIRS['shared'] = $files;
- return opendir('fakedir://shared');
}
+ $FAKEDIRS['shared'] = $files;
+ return opendir('fakedir://shared');
} else {
$source = $this->getSource($path);
if ($source) {