提交 fef47e12 编写于 作者: O Oleg Nenashev

Merge pull request #1408 from howlger/master

[FIXED JENKINS-22514] In ZIP archives file separator must be '/'
......@@ -354,7 +354,11 @@ public final class DirectoryBrowserSupport implements HttpResponse {
} else {
relativePath = n;
}
ZipEntry e = new ZipEntry(relativePath);
// In ZIP archives "All slashes MUST be forward slashes" (http://pkware.com/documents/casestudies/APPNOTE.TXT)
// TODO On Linux file names can contain backslashes which should not treated as file separators.
// Unfortunately, only the file separator char of the master is known (File.separatorChar)
// but not the file separator char of the (maybe remote) "dir".
ZipEntry e = new ZipEntry(relativePath.replace('\\', '/'));
VirtualFile f = dir.child(n);
e.setTime(f.lastModified());
zos.putNextEntry(e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册