From d241db91c31c991dc1f167668f249369b0014d04 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Tue, 14 Nov 2023 15:53:48 +0100 Subject: [PATCH] IBX-6880: Rollback --- eZ/Publish/Core/IO/FilePathNormalizer/Flysystem.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } }