Skip to content

Commit 04ce5e7

Browse files
author
Anna Bukatar
committed
ACP2E-1701: Error when flushing JavaScript/CSS cache
1 parent aab3ee6 commit 04ce5e7

File tree

1 file changed

+4
-3
lines changed
  • lib/internal/Magento/Framework/Filesystem/Driver

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/Filesystem/Driver/File.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,19 +440,20 @@ public function symlink($source, $destination, DriverInterface $targetDriver = n
440440
*/
441441
public function deleteFile($path)
442442
{
443-
$result = @unlink($this->getScheme() . $path);
443+
@unlink($this->getScheme() . $path);
444444
if ($this->stateful) {
445445
clearstatcache(true, $this->getScheme() . $path);
446446
}
447-
if (!$result) {
447+
448+
if ($this->isFile($path)) {
448449
throw new FileSystemException(
449450
new Phrase(
450451
'The "%1" file can\'t be deleted. %2',
451452
[$path, $this->getWarningMessage()]
452453
)
453454
);
454455
}
455-
return $result;
456+
return true;
456457
}
457458

458459
/**

0 commit comments

Comments
 (0)