Skip to content

Commit b3c2899

Browse files
authored
Update LfmPath.php
1 parent 7f07972 commit b3c2899

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
@@ -66,7 +66,10 @@ public function path($type = 'storage')
6666
return $this->translateToLfmPath($this->normalizeWorkingDir());
6767
} elseif ($type == 'url') {
6868
// storage: files/{user_slug}
69-
return $this->helper->getCategoryName() . $this->path('working_dir');
69+
// storage without folder: {user_slug}
70+
return $this->helper->getCategoryName() === '.'
71+
? ltrim($this->path('working_dir'), '/')
72+
: $this->helper->getCategoryName() . $this->path('working_dir');
7073
} elseif ($type == 'storage') {
7174
// storage: files/{user_slug}
7275
// storage on windows: files\{user_slug}

0 commit comments

Comments
 (0)