Skip to content

Commit ef2731b

Browse files
committed
Fix for images located unser the / path
1 parent f0fab44 commit ef2731b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/code/Magento/MediaGallery/Model/ResourceModel/DeleteAssetsByPaths.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function execute(array $paths): void
5555
foreach ($paths as $path) {
5656
try {
5757
$this->validateDirectoryPath($path);
58+
$path = count(explode('/', $path)) > 1 ? $path : '/' . $path;
5859
$this->deleteAssetsByDirectoryPath($path);
5960
} catch (\Exception $exception) {
6061
$this->logger->critical($exception);

0 commit comments

Comments
 (0)