Skip to content

Commit 570cb21

Browse files
MAGETWO-33619: [SPIKE] Investigate moving the Media Storage components out of Core module
1 parent 8bbd521 commit 570cb21

File tree

1 file changed

+4
-2
lines changed
  • app/code/Magento/MediaStorage/Model/File/Storage/Directory

1 file changed

+4
-2
lines changed

app/code/Magento/MediaStorage/Model/File/Storage/Directory/Database.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function importDirectories($dirs)
193193
}
194194

195195
try {
196-
$dir['path'] = ltrim($dir['path'], '.');
196+
$dir['path'] = ltrim($dir['path'], './');
197197
$directory = $this->_directoryFactory->create(['connectionName' => $this->getConnectionName()]);
198198
$directory->setPath($dir['path']);
199199

@@ -203,7 +203,9 @@ public function importDirectories($dirs)
203203
$directory->setUploadTime($dateSingleton->date());
204204
$directory->save();
205205
} else {
206-
throw new \Magento\Framework\Exception\LocalizedException(__('Parent directory does not exist: %1', $dir['path']));
206+
throw new \Magento\Framework\Exception\LocalizedException(
207+
__('Parent directory does not exist: %1', $dir['path'])
208+
);
207209
}
208210
} catch (\Exception $e) {
209211
$this->_logger->critical($e);

0 commit comments

Comments
 (0)