From f967feaca9836eb4295b588482d2fba27e59e8c1 Mon Sep 17 00:00:00 2001 From: Ciprian Ciubotariu Date: Wed, 28 Sep 2011 03:09:14 +0300 Subject: [PATCH] [JENKINS-9577] Fix last modification timestamp after unzip Reordered operations in order to set the file modification time after applying the permissions. --- core/src/main/java/hudson/FilePath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index a8582d4a38..15aa9fa116 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -499,7 +499,6 @@ public final class FilePath implements Serializable { p.mkdirs(); } IOUtils.copy(zip.getInputStream(e), f); - f.setLastModified(e.getTime()); try { FilePath target = new FilePath(f); int mode = e.getUnixMode(); @@ -508,6 +507,7 @@ public final class FilePath implements Serializable { } catch (InterruptedException ex) { LOGGER.log(Level.WARNING, "unable to set permissions", ex); } + f.setLastModified(e.getTime()); } } } finally { -- GitLab