Skip to content

Commit 826553b

Browse files
authored
Merge pull request #4484 from magento-borg/MC-18101
[borg] Bug fixes
2 parents 8b0a0d7 + 04f44c3 commit 826553b

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/ImportExport/Controller/Adminhtml/Export/File

1 file changed

+5
-0
lines changed

app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public function execute()
6767
}
6868
$directory = $this->filesystem->getDirectoryRead(DirectoryList::VAR_DIR);
6969
$path = $directory->getAbsolutePath() . 'export/' . $fileName;
70+
71+
if (!$directory->isFile($path)) {
72+
throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
73+
}
74+
7075
$this->file->deleteFile($path);
7176
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
7277
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);

0 commit comments

Comments
 (0)