summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/taskmanager
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-10 13:51:12 +0100
committerSimon Rettberg2020-12-10 13:51:12 +0100
commitd9d777cbb4a426e996fe7fa04e28561d6eaa0707 (patch)
treecc8b893f0762f5241a4262bcb3a5e72cda8b12b0 /src/main/java/org/openslx/taskmanager
parent[ListArchive] Add more data to output (diff)
downloadtmlite-bwlp-d9d777cbb4a426e996fe7fa04e28561d6eaa0707.tar.gz
tmlite-bwlp-d9d777cbb4a426e996fe7fa04e28561d6eaa0707.tar.xz
tmlite-bwlp-d9d777cbb4a426e996fe7fa04e28561d6eaa0707.zip
[RecompressArchive] Add forceRoot flag to chown/chgrp to root
Diffstat (limited to 'src/main/java/org/openslx/taskmanager')
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/RecompressArchive.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/RecompressArchive.java b/src/main/java/org/openslx/taskmanager/tasks/RecompressArchive.java
index 1fc897d..04e7ed6 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/RecompressArchive.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/RecompressArchive.java
@@ -32,6 +32,9 @@ public class RecompressArchive extends AbstractTask
@Expose
private String outputFile;
+
+ @Expose
+ private boolean forceRoot;
/*
* Own vars/constants not being deserialized
@@ -110,7 +113,7 @@ public class RecompressArchive extends AbstractTask
if ( inEntry.getName().equals( "/" ) || inEntry.getName().equals( "./" ) )
continue;
// Construct TarArchiveEntry - we want unix stuff like uid/gid, links, file/dir mode, so try to get from source archive
- TarArchiveEntry outEntry = Archive.createTarArchiveEntry( inEntry, 0, 0, 0755, 0644 );
+ TarArchiveEntry outEntry = Archive.createTarArchiveEntry( inEntry, 0, 0, 0755, 0644, this.forceRoot );
if ( outEntry == null ) {
status.addWarning( "Ignoring invalid entry " + inEntry.getName() + " in " + a.inputFile );
continue;