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)
533
533
*/
534
534
public function deleteDirectory ($ path )
535
535
{
536
- if (!$ this ->isDirectoryAllowed (dirname ($ path ))) {
536
+ if (!$ this ->isDirectoryAllowed ($ this -> file -> getParentDirectory ($ path ))) {
537
537
throw new \Magento \Framework \Exception \LocalizedException (
538
538
__ ('We cannot delete the selected directory. ' )
539
539
);
@@ -582,7 +582,7 @@ protected function _deleteByPath($path)
582
582
*/
583
583
public function deleteFile ($ target )
584
584
{
585
- if (!$ this ->isDirectoryAllowed (dirname ($ target ))) {
585
+ if (!$ this ->isDirectoryAllowed ($ this -> file -> getParentDirectory ($ target ))) {
586
586
throw new \Magento \Framework \Exception \LocalizedException (
587
587
__ ('We can \'t delete the file right now. ' )
588
588
);
You can’t perform that action at this time.
0 commit comments