diff --git a/eZ/Publish/Core/IO/FilePathNormalizer/Flysystem.php b/eZ/Publish/Core/IO/FilePathNormalizer/Flysystem.php index dff3ed6062..fc96e6dbb1 100644 --- a/eZ/Publish/Core/IO/FilePathNormalizer/Flysystem.php +++ b/eZ/Publish/Core/IO/FilePathNormalizer/Flysystem.php @@ -35,9 +35,8 @@ public function normalizePath(string $filePath, bool $doHash = true): string ? (preg_match(self::HASH_PATTERN, $fileName) ? '' : bin2hex(random_bytes(6)) . '-') : ''; - $filePath = $directory . \DIRECTORY_SEPARATOR . $hash; - $normalizedFileName = Util::normalizePath($fileName); + $filePath = $directory . \DIRECTORY_SEPARATOR . $hash . $fileName; - return $filePath . $normalizedFileName; + return Util::normalizePath($filePath); } }