Skip to content

Commit 3e2c401

Browse files
committed
MC-31733: Media gallery breaks in some filesystems
1 parent 8012fe4 commit 3e2c401

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Theme/Model/Wysiwyg/Storage.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ public function deleteDirectory($path)
341341
{
342342
$rootCmp = rtrim($this->_helper->getStorageRoot(), '/');
343343
$pathCmp = rtrim($path, '/');
344-
$absolutePath = $this->filesystemDriver->getRealPathSafety($this->mediaWriteDirectory->getAbsolutePath($path));
344+
$absolutePath = rtrim(
345+
$this->filesystemDriver->getRealPathSafety($this->mediaWriteDirectory->getAbsolutePath($path)),
346+
'/'
347+
);
345348

346349
if ($rootCmp == $pathCmp || $rootCmp === $absolutePath) {
347350
throw new \Magento\Framework\Exception\LocalizedException(

0 commit comments

Comments
 (0)