Skip to content

Commit c7a43cb

Browse files
joshgoldman-googlecopybara-github
authored andcommitted
Don't try to delete paths that don't exist
PiperOrigin-RevId: 506905444 Change-Id: I6dc676d6e41a2dd5e6bb80a1c92d8927906a0ee2
1 parent ce6244a commit c7a43cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/com/google/copybara/CheckoutPath.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ public void remove() throws ValidationException, EvalException {
242242
})
243243
public void rmDir(boolean recursive) throws ValidationException, EvalException {
244244
try {
245+
if (!Files.exists(checkoutDir.resolve(path))) {
246+
return;
247+
}
245248
if (recursive) {
246249
FileUtil.deleteRecursively(checkoutDir.resolve(path));
247250
} else {

0 commit comments

Comments
 (0)