diff --git a/java/com/google/copybara/testing/RecordsProcessCallDestination.java b/java/com/google/copybara/testing/RecordsProcessCallDestination.java index 41fae8d3e..9609ffa94 100644 --- a/java/com/google/copybara/testing/RecordsProcessCallDestination.java +++ b/java/com/google/copybara/testing/RecordsProcessCallDestination.java @@ -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)); + } } }; }