Skip to content

Commit 106627d

Browse files
committed
B2B-1876: New directories in pub/media do not get synced back to local filesystem from S3 Remote Storage
1 parent 2c72455 commit 106627d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public function createDirectory($name, $path)
533533
*/
534534
public function deleteDirectory($path)
535535
{
536-
if (!$this->isDirectoryAllowed(dirname($path))) {
536+
if (!$this->isDirectoryAllowed($this->file->getParentDirectory($path))) {
537537
throw new \Magento\Framework\Exception\LocalizedException(
538538
__('We cannot delete the selected directory.')
539539
);
@@ -582,7 +582,7 @@ protected function _deleteByPath($path)
582582
*/
583583
public function deleteFile($target)
584584
{
585-
if (!$this->isDirectoryAllowed(dirname($target))) {
585+
if (!$this->isDirectoryAllowed($this->file->getParentDirectory($target))) {
586586
throw new \Magento\Framework\Exception\LocalizedException(
587587
__('We can\'t delete the file right now.')
588588
);

0 commit comments

Comments
 (0)