TarDecoder should support GNU long filenames
davidmorgan opened this issue · 4 comments
davidmorgan commented
GNU tar puts filenames in files when they exceed tar's native length. The fix is pretty straightforward
String nextName = null;
for (var archiveFile in archive) {
if (archiveFile.name == '././@LongLink') {
nextName = archiveFile.rawContent.readString();
continue;
}
var name = nextName ?? archiveFile.name;
nextName = null;
...process the file here...
}
brendan-duncan commented
Sorry I totally slacked on looking into this. I added it to the tar decoder (locally), will test it and push it shortly. Thanks a lot for the code example!
brendan-duncan commented
I tested it and pushed the change. I'll publish the fix shortly.
brendan-duncan commented
Published. And also used the gnu tar method for encoding when it hits a name longer than 100 (tar header filename length).
davidmorgan commented
Thanks!