Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ public MultipleFileDownload downloadDirectory(String bucketName, String keyPrefi

private boolean leavesRoot(File localBaseDirectory, String key) {
try {
return !new File(localBaseDirectory, key).getCanonicalPath().startsWith(localBaseDirectory.getCanonicalPath());
return !new File(localBaseDirectory, key).getCanonicalFile().toPath().startsWith(localBaseDirectory.getCanonicalFile().toPath());
} catch (IOException e) {
throw new RuntimeException("Unable to canonicalize paths", e);
}
Expand Down