Skip to content

Commit

Permalink
File delete is always returning false on Mac even though it succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Jul 30, 2021
1 parent 3e48eb2 commit ccef4a5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public void run() {
// Should we try to use git to move the file first, and only if that fails fall back to this?
assert result.getBefore() != null;
Path originalLocation = results.getProjectRoot().resolve(result.getBefore().getSourcePath());
boolean deleteSucceeded = originalLocation.toFile().delete();
if (!deleteSucceeded) {
throw new IOException("Unable to delete file " + originalLocation.toAbsolutePath());
}
/*boolean deleteSucceeded = */originalLocation.toFile().delete();
// if (!deleteSucceeded) {
// throw new IOException("Unable to delete file " + originalLocation.toAbsolutePath());
// }
assert result.getAfter() != null;
// Ensure directories exist in case something was moved into a hitherto non-existent package
Path afterLocation = results.getProjectRoot().resolve(result.getAfter().getSourcePath());
Expand Down

0 comments on commit ccef4a5

Please sign in to comment.