Skip to content

Commit 53e5175

Browse files
authored
Merge pull request #1083 from weareflip/feature/root-folder-category
Allow config to set the files folder to the root
2 parents 0a1d237 + b3c2899 commit 53e5175

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/LfmPath.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public function path($type = 'storage')
6969
return $this->translateToLfmPath($this->normalizeWorkingDir());
7070
} elseif ($type == 'url') {
7171
// storage: files/{user_slug}
72-
return $this->helper->getCategoryName() . $this->path('working_dir');
72+
// storage without folder: {user_slug}
73+
return $this->helper->getCategoryName() === '.'
74+
? ltrim($this->path('working_dir'), '/')
75+
: $this->helper->getCategoryName() . $this->path('working_dir');
7376
} elseif ($type == 'storage') {
7477
// storage: files/{user_slug}
7578
// storage on windows: files\{user_slug}

0 commit comments

Comments
 (0)