Skip to content

Commit 65a267b

Browse files
authored
Merge pull request #786 from exabyssus/patch-1
Trim existing slashes before appending new ones
2 parents 0e98e72 + f4fd708 commit 65a267b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LfmPath.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ public function normalizeWorkingDir()
177177
?: $this->helper->getRootFolder();
178178

179179
if ($this->is_thumb) {
180-
$path .= Lfm::DS . $this->helper->getThumbFolderName();
180+
$path = rtrim($path, Lfm::DS) . Lfm::DS . $this->helper->getThumbFolderName();
181181
}
182182

183183
if ($this->getName()) {
184-
$path .= Lfm::DS . $this->getName();
184+
$path = rtrim($path, Lfm::DS) . Lfm::DS . $this->getName();
185185
}
186186

187187
return $path;

0 commit comments

Comments
 (0)