Skip to content

Commit 01ac38b

Browse files
author
Stanislav Idolov
committed
Updated MediaGallery modules and marked as API
1 parent 6e077c3 commit 01ac38b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/MediaGallery/Model/Directory/Command/CreateByPaths.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public function execute(array $paths): void
4848
foreach ($paths as $path) {
4949
try {
5050
$name = basename($path);
51+
$folder = str_replace($name, '', $path);
52+
5153
$this->storage->createDirectory(
5254
$name,
53-
$this->storage->getCmsWysiwygImages()->getStorageRoot() . $path
55+
$this->storage->getCmsWysiwygImages()->getStorageRoot() . $folder
5456
);
5557
} catch (\Exception $exception) {
5658
$this->logger->critical($exception);

0 commit comments

Comments
 (0)