commit
0d13264c81
|
@ -256,7 +256,7 @@ class BootZipCopyAction implements CopyAction {
|
||||||
private void processDirectory(FileCopyDetails details) throws IOException {
|
private void processDirectory(FileCopyDetails details) throws IOException {
|
||||||
String name = details.getRelativePath().getPathString();
|
String name = details.getRelativePath().getPathString();
|
||||||
ZipArchiveEntry entry = new ZipArchiveEntry(name + '/');
|
ZipArchiveEntry entry = new ZipArchiveEntry(name + '/');
|
||||||
prepareEntry(entry, name, getTime(details), getFileMode(details));
|
prepareEntry(entry, name, getTime(details), getDirMode(details));
|
||||||
this.out.putArchiveEntry(entry);
|
this.out.putArchiveEntry(entry);
|
||||||
this.out.closeArchiveEntry();
|
this.out.closeArchiveEntry();
|
||||||
this.writtenDirectories.add(name);
|
this.writtenDirectories.add(name);
|
||||||
|
@ -476,17 +476,21 @@ class BootZipCopyAction implements CopyAction {
|
||||||
|
|
||||||
private int getDirMode() {
|
private int getDirMode() {
|
||||||
return (BootZipCopyAction.this.dirMode != null) ? BootZipCopyAction.this.dirMode
|
return (BootZipCopyAction.this.dirMode != null) ? BootZipCopyAction.this.dirMode
|
||||||
: UnixStat.DIR_FLAG | UnixStat.DEFAULT_DIR_PERM;
|
: UnixStat.DEFAULT_DIR_PERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getFileMode() {
|
private int getFileMode() {
|
||||||
return (BootZipCopyAction.this.fileMode != null) ? BootZipCopyAction.this.fileMode
|
return (BootZipCopyAction.this.fileMode != null) ? BootZipCopyAction.this.fileMode
|
||||||
: UnixStat.FILE_FLAG | UnixStat.DEFAULT_FILE_PERM;
|
: UnixStat.DEFAULT_FILE_PERM;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getDirMode(FileCopyDetails details) {
|
||||||
|
return (BootZipCopyAction.this.fileMode != null) ? BootZipCopyAction.this.dirMode : getPermissions(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getFileMode(FileCopyDetails details) {
|
private int getFileMode(FileCopyDetails details) {
|
||||||
return (BootZipCopyAction.this.fileMode != null) ? BootZipCopyAction.this.fileMode
|
return (BootZipCopyAction.this.fileMode != null) ? BootZipCopyAction.this.fileMode
|
||||||
: UnixStat.FILE_FLAG | getPermissions(details);
|
: getPermissions(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPermissions(FileCopyDetails details) {
|
private int getPermissions(FileCopyDetails details) {
|
||||||
|
|
|
@ -589,10 +589,10 @@ abstract class AbstractBootArchiveIntegrationTests {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
assertEntryMode(entry, UnixStat.DIR_FLAG | UnixStat.DEFAULT_DIR_PERM);
|
assertEntryMode(entry, UnixStat.DEFAULT_DIR_PERM);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assertEntryMode(entry, UnixStat.FILE_FLAG | UnixStat.DEFAULT_FILE_PERM);
|
assertEntryMode(entry, UnixStat.DEFAULT_FILE_PERM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue