Skip to content

Commit

Permalink
Add warning about failure to remove legacy file
Browse files Browse the repository at this point in the history
  • Loading branch information
bergice committed Apr 10, 2019
1 parent 5d94cea commit 1809691
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FileMigrationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ protected function migrateFile($base, File $file, $legacyFilename)

if (!$useLegacyFilenames) {
// removing the legacy file since it has been migrated now and not using legacy filenames
return unlink($path);
$removed = unlink($path);
if (!$removed) {
$this->logger->warning("$legacyFilename was migrated, but failed to remove the legacy file ($path)");
}
return $removed;
}
return true;
}
Expand Down

0 comments on commit 1809691

Please sign in to comment.