Skip to content

Commit 9f80548

Browse files
committed
fix creating default folders
1 parent 45ad6e3 commit 9f80548

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/controllers/FolderController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function getFolders()
2222
$folder_types['user'] = 'root';
2323
}
2424

25-
if ((parent::allowMultiUser() && parent::enabledShareFolder()) || !parent::allowMultiUser()) {
25+
if (parent::allowShareFolder()) {
2626
$folder_types['share'] = 'shares';
2727
}
2828

src/middlewares/CreateDefaultFolder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private function checkDefaultFolderExists($type = 'share')
2323
return;
2424
}
2525

26-
if ($type === 'share' && (!$this->enabledShareFolder() || !$this->allowMultiUser())) {
26+
if ($type === 'share' && !$this->allowShareFolder()) {
2727
return;
2828
}
2929

src/traits/LfmHelpers.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,12 @@ public function allowMultiUser()
230230
return config('lfm.allow_multi_user') === true;
231231
}
232232

233-
public function enabledShareFolder()
233+
public function allowShareFolder()
234234
{
235+
if (!$this->allowMultiUser()) {
236+
return true;
237+
}
238+
235239
return config('lfm.allow_share_folder') === true;
236240
}
237241

0 commit comments

Comments
 (0)