Skip to content

Commit

Permalink
Fixing java.nio.file.NoSuchFileException (aws#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Schaef <[email protected]>
  • Loading branch information
martinschaef and Martin Schaef authored Jul 1, 2022
1 parent d3476f5 commit 8855a9b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ private static Collection<Path> getChangedFiles(final Repository repository) thr
if (treeWalk.isSubtree()) {
treeWalk.enterSubtree();
} else {
val normalizedPath = rootDir.resolve(treeWalk.getPathString()).toRealPath();
allFiles.add(normalizedPath);
val normalizedFile = rootDir.resolve(treeWalk.getPathString()).toFile().getCanonicalFile();
if (normalizedFile.isFile()) {
allFiles.add(normalizedFile.toPath());
}
}
}
return allFiles;
Expand Down

0 comments on commit 8855a9b

Please sign in to comment.