File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/code/Magento/Cms/Model/Wysiwyg/Images Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments