Skip to content

Commit

Permalink
Canonicalize path to files for cache (#59)
Browse files Browse the repository at this point in the history
Change 'toAbsolutePath().normalize()' to 'toFile().getCanonicalPath()' to remove unnecessary disk path
  • Loading branch information
hazendaz authored Mar 22, 2022
1 parent f5899b3 commit ef9469c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public final void execute() throws MojoExecutionException, MojoFailureException
try {
byte[] buf = Files.readAllBytes(path);
String newHash = getHash(buf);
String key = path.toAbsolutePath().normalize().toString();
String key = path.toFile().getCanonicalPath();
String prvHash = hashCache.getProperty(key);
if (prvHash != null && prvHash.equals(newHash)) {
numAlreadySorted.getAndIncrement();
Expand Down

0 comments on commit ef9469c

Please sign in to comment.