summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/satserver/util/Archive.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/satserver/util/Archive.java b/src/main/java/org/openslx/satserver/util/Archive.java
index 25285e7..e52a5f6 100644
--- a/src/main/java/org/openslx/satserver/util/Archive.java
+++ b/src/main/java/org/openslx/satserver/util/Archive.java
@@ -118,11 +118,10 @@ public class Archive
outEntry.setSize( inEntry.getSize() );
if ( inEntry instanceof TarArchiveEntry ) {
// Source is tar - easy
- outEntry.setUserName( ( (TarArchiveEntry)inEntry ).getUserName() );
- outEntry.setGroupName( ( (TarArchiveEntry)inEntry ).getGroupName() );
- outEntry.setIds( ( (TarArchiveEntry)inEntry ).getUserId(), ( (TarArchiveEntry)inEntry ).getGroupId() );
- outEntry.setMode( ( (TarArchiveEntry)inEntry ).getMode() );
- outEntry.setModTime( ( (TarArchiveEntry)inEntry ).getLastModifiedDate() );
+ byte[] buffer = new byte[1000];
+ ( (TarArchiveEntry)inEntry ).writeEntryHeader( buffer );
+ outEntry.parseTarHeader( buffer );
+ outEntry.setName( name ); // Reset, as this was overwritten
} else if ( inEntry instanceof ArArchiveEntry ) {
// Source is ar - has most of the stuff tar supports; transform
outEntry.setIds( ( (ArArchiveEntry)inEntry ).getUserId(), ( (ArArchiveEntry)inEntry ).getGroupId() );