Skip to content

Commit

Permalink
[FIXED JENKINS-13122] Last modification date of files in a zip are no…
Browse files Browse the repository at this point in the history
…t the original timestamps
  • Loading branch information
ssogabe committed Mar 17, 2012
1 parent b0e1204 commit 3ddd6bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions changelog.html
Expand Up @@ -63,13 +63,16 @@
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13097">issue 13097</a>)
<li class=bug>
Breadcrumb popup menu gives javascript error on Internet Explorer 8.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13082">issue 13082</a>~
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13082">issue 13082</a>)
<li class=bug>
Ajax on Update Center does not work in prototype 1.7
<li class=bug>
'View as plain text' in Console Output is hidden by the new breadcrums bar
<li class=bug>
Last modification date of files in a zip are not the original timestamps
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13122">issue 13122</a>)
<li class="rfe">
Jenkins uses correct port in mDNS advertisement and shows up in Safari Bonjour bookmarks.</li>
Jenkins uses correct port in mDNS advertisement and shows up in Safari Bonjour bookmarks.
</ul>
</div><!--=TRUNK-END=-->

Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/util/io/ZipArchiver.java
Expand Up @@ -61,11 +61,13 @@ public void visit(final File f, final String _relativePath) throws IOException {
// Setting this bit explicitly is needed by some unzipping applications (see JENKINS-3294).
dirZipEntry.setExternalAttributes(BITMASK_IS_DIRECTORY);
if (mode!=-1) dirZipEntry.setUnixMode(mode);
dirZipEntry.setTime(f.lastModified());
zip.putNextEntry(dirZipEntry);
zip.closeEntry();
} else {
ZipEntry fileZipEntry = new ZipEntry(relativePath);
if (mode!=-1) fileZipEntry.setUnixMode(mode);
fileZipEntry.setTime(f.lastModified());
zip.putNextEntry(fileZipEntry);
FileInputStream in = new FileInputStream(f);
int len;
Expand Down

0 comments on commit 3ddd6bf

Please sign in to comment.