Skip to content

Commit

Permalink
exists() in mock Destination uses file prefix
Browse files Browse the repository at this point in the history
BUG=232966000
PiperOrigin-RevId: 512939989
Change-Id: I227db28e363bd4aa5c139e6134f91eb5cd21d3b4
  • Loading branch information
joshgoldman-google authored and copybara-github committed Mar 2, 2023
1 parent 4b4ccca commit ef6aa85
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ public void copyDestinationFilesToDirectory(Glob glob, Path directory)

@Override
public boolean exists(String path) {
return Files.exists(filePrefix.resolve(path));
if (filePrefix != null) {
return Files.exists(filePrefix.resolve(path));
} else {
return Files.exists(Path.of(path));
}
}
};
}
Expand Down

0 comments on commit ef6aa85

Please sign in to comment.