Skip to content

Commit 54ecb8e

Browse files
committed
B2B-1875:Cannot import table rates CSV when S3 Remote Storage is enabled
- Added bug fix changes to import table rates
1 parent 7e364fd commit 54ecb8e

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier

1 file changed

+3
-3
lines changed

app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ public function getConditionName(\Magento\Framework\DataObject $object)
321321
private function getCsvFile($filePath)
322322
{
323323
$pathInfo = pathinfo($filePath);
324-
$dirName = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : '';
325-
$fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : '';
324+
$dirName = $pathInfo['dirname'] ?? '';
325+
$fileName = $pathInfo['basename'] ?? '';
326326

327-
$directoryRead = $this->filesystem->getDirectoryReadByPath($dirName);
327+
$directoryRead = $this->filesystem->getDirectoryReadByPath($dirName, Filesystem\DriverPool::FILE);
328328

329329
return $directoryRead->openFile($fileName);
330330
}

0 commit comments

Comments
 (0)