Skip to content

Commit

Permalink
Return -1 when getting mtime for file if it doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed May 27, 2024
1 parent d180402 commit b6bbda2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public long getModificationStamp() {
FileTime ret = Files.getLastModifiedTime(this.file.toPath());
return ret.to(TimeUnit.NANOSECONDS);
} catch (IOException e) {
throw new RuntimeException(e);
return -1; // File does not exist.
}
}

Expand Down

0 comments on commit b6bbda2

Please sign in to comment.