Fix return for empty Shared folder in opendir()
This commit is contained in:
parent
eb4cd86910
commit
64a24191a3
|
@ -79,9 +79,6 @@ 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)) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
global $FAKEDIRS;
|
global $FAKEDIRS;
|
||||||
$files = array();
|
$files = array();
|
||||||
foreach ($sharedItems as $item) {
|
foreach ($sharedItems as $item) {
|
||||||
|
@ -92,7 +89,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
|
||||||
}
|
}
|
||||||
$FAKEDIRS['shared'] = $files;
|
$FAKEDIRS['shared'] = $files;
|
||||||
return opendir('fakedir://shared');
|
return opendir('fakedir://shared');
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$source = $this->getSource($path);
|
$source = $this->getSource($path);
|
||||||
if ($source) {
|
if ($source) {
|
||||||
|
|
Loading…
Reference in New Issue