Skip to content

Commit

Permalink
[JENKINS-9577] Fix last modification timestamp after unzip
Browse files Browse the repository at this point in the history
Reordered operations in order to set the file modification time
after applying the permissions.
  • Loading branch information
CMoH committed Sep 28, 2011
1 parent 8e9e6ac commit f967fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/FilePath.java
Expand Up @@ -499,7 +499,6 @@ private void unzip(File dir, File zipFile) throws IOException {
p.mkdirs();
}
IOUtils.copy(zip.getInputStream(e), f);
f.setLastModified(e.getTime());
try {
FilePath target = new FilePath(f);
int mode = e.getUnixMode();
Expand All @@ -508,6 +507,7 @@ private void unzip(File dir, File zipFile) throws IOException {
} catch (InterruptedException ex) {
LOGGER.log(Level.WARNING, "unable to set permissions", ex);
}
f.setLastModified(e.getTime());
}
}
} finally {
Expand Down

0 comments on commit f967fea

Please sign in to comment.