Skip to content

Commit 0d5c550

Browse files
[JENKINS-76192] Ignore NoSuchFileException in FilePath#unzip (#11186)
1 parent 17abe4f commit 0d5c550

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/main/java/hudson/FilePath.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,10 +718,14 @@ private static void unzip(File dir, File zipFile) throws IOException {
718718
int mode = e.getUnixMode();
719719
if (mode != 0) // Ant returns 0 if the archive doesn't record the access mode
720720
target.chmod(mode);
721-
} catch (InterruptedException ex) {
721+
} catch (InterruptedException | NoSuchFileException ex) {
722722
LOGGER.log(Level.WARNING, "unable to set permissions", ex);
723723
}
724-
Files.setLastModifiedTime(Util.fileToPath(f), e.getLastModifiedTime());
724+
try {
725+
Files.setLastModifiedTime(Util.fileToPath(f), e.getLastModifiedTime());
726+
} catch (NoSuchFileException ex) {
727+
LOGGER.log(Level.WARNING, "unable to set last modified time", ex);
728+
}
725729
}
726730
}
727731
}

0 commit comments

Comments
 (0)