Skip to content
Snippets Groups Projects
Commit 853d1730 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files
parents 929ce2b5 64a24191
No related branches found
No related tags found
No related merge requests found
...@@ -79,20 +79,16 @@ class OC_Filestorage_Shared extends OC_Filestorage { ...@@ -79,20 +79,16 @@ class OC_Filestorage_Shared extends OC_Filestorage {
if ($path == "" || $path == "/") { if ($path == "" || $path == "/") {
$path = $this->datadir.$path; $path = $this->datadir.$path;
$sharedItems = OC_Share::getItemsInFolder($path); $sharedItems = OC_Share::getItemsInFolder($path);
if (empty($sharedItems)) { global $FAKEDIRS;
return false; $files = array();
} else { foreach ($sharedItems as $item) {
global $FAKEDIRS; // If item is in the root of the shared storage provider and the item exists add it to the fakedirs
$files = array(); if (dirname($item['target'])."/" == $path && $this->file_exists(basename($item['target']))) {
foreach ($sharedItems as $item) { $files[] = basename($item['target']);
// 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 { } else {
$source = $this->getSource($path); $source = $this->getSource($path);
if ($source) { if ($source) {
......
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