Skip to content

Commit f4fd708

Browse files
authored
Trim existing slashes, before appending new ones
If working dir is "/" normalizeWorkingDir will add double "//" that breaks S3 functionality
1 parent 5635aaa commit f4fd708

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)