From 378ebfb6924f9cba98bdc156afcf6e5a0fd1bb0f Mon Sep 17 00:00:00 2001 From: Stream Date: Thu, 23 Mar 2017 14:35:27 +0800 Subject: [PATCH] fix default folder logic --- src/controllers/FolderController.php | 2 +- src/traits/LfmHelpers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/FolderController.php b/src/controllers/FolderController.php index fb974a95..5f5fe9a2 100644 --- a/src/controllers/FolderController.php +++ b/src/controllers/FolderController.php @@ -22,7 +22,7 @@ public function getFolders() $folder_types['user'] = 'root'; } - if (parent::allowMultiUser() && parent::enabledShareFolder()) { + if ((parent::allowMultiUser() && parent::enabledShareFolder()) || !parent::allowMultiUser()) { $folder_types['share'] = 'shares'; } diff --git a/src/traits/LfmHelpers.php b/src/traits/LfmHelpers.php index 0e5dd80f..7d1d01d9 100644 --- a/src/traits/LfmHelpers.php +++ b/src/traits/LfmHelpers.php @@ -72,7 +72,7 @@ private function getFormatedWorkingDir() { $working_dir = request('working_dir'); - if (is_null($working_dir)) { + if (empty($working_dir)) { $default_folder_type = 'share'; if ($this->allowMultiUser()) { $default_folder_type = 'user';