Skip to content

Commit e58b8a7

Browse files
committed
Fixes #1820: Normalise paths for checksum calls.
1 parent 0adc0d9 commit e58b8a7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Filesystem.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ public function publicUrl(string $path, array $config = []): string
187187
?? throw UnableToGeneratePublicUrl::noGeneratorConfigured($path);
188188
$config = $this->config->extend($config);
189189

190-
return $this->publicUrlGenerator->publicUrl($this->pathNormalizer->normalizePath($path), $config);
190+
return $this->publicUrlGenerator->publicUrl(
191+
$this->pathNormalizer->normalizePath($path),
192+
$config,
193+
);
191194
}
192195

193196
public function temporaryUrl(string $path, DateTimeInterface $expiresAt, array $config = []): string
@@ -214,9 +217,15 @@ public function checksum(string $path, array $config = []): string
214217
}
215218

216219
try {
217-
return $this->adapter->checksum($path, $config);
220+
return $this->adapter->checksum(
221+
$this->pathNormalizer->normalizePath($path),
222+
$config,
223+
);
218224
} catch (ChecksumAlgoIsNotSupported) {
219-
return $this->calculateChecksumFromStream($path, $config);
225+
return $this->calculateChecksumFromStream(
226+
$this->pathNormalizer->normalizePath($path),
227+
$config,
228+
);
220229
}
221230
}
222231

0 commit comments

Comments
 (0)