XAD and tar.gz archives
Posted: Sun Jan 31, 2021 1:30 pm
I've been wondering why I get a filename inside a gzip archive as "unnamed.dat" with Hollywood's XAD plugin. Other programs show the name as the archive name, even XAD's own commandline tools. The XAD plugin seems to be only one showing this "unnamed.dat".
I hunted it down now, and it seems that if I create a .tar.gz by first using the tar command and then separately pack it with the gzip command, then it all works fine and the XAD plugin shows the name correctly. But if I take a shortcut and use the -z option with the tar and pack everything in one go with a single command, then I get this "unnamed.dat" when I try to list that archive with the XAD plugin.
Is this something that the XAD plugin should handle better, or should I just write a work-around in my program for the naming if I come up with the "unnamed.dat" filename?
For example, download this file and then this happens:
Will output:
But other programs (Ambient, XADopus, XADUnFile) will look like this:
As you can see, the filename is "led-20200202.tar" and not "unnamed.dat".
I hunted it down now, and it seems that if I create a .tar.gz by first using the tar command and then separately pack it with the gzip command, then it all works fine and the XAD plugin shows the name correctly. But if I take a shortcut and use the -z option with the tar and pack everything in one go with a single command, then I get this "unnamed.dat" when I try to list that archive with the XAD plugin.
Is this something that the XAD plugin should handle better, or should I just write a work-around in my program for the naming if I come up with the "unnamed.dat" filename?
For example, download this file and then this happens:
Code: Select all
@REQUIRE "xad", {InstallAdapter = True}
For s$,t In DirectoryItems("led-20200202.tar.gz")
DebugPrint(s$, t.time)
NextCode: Select all
unnamed.dat 01-Jan-2070 02:00:00But other programs (Ambient, XADopus, XADUnFile) will look like this:
Code: Select all
Ram Disk:> xadunfile led-20200202.tar.gz list
ClientName: GZip
Size CrndSize Ratio Date Time Name
81408 13860 83.0% 01.01.1970 00:00:00 led-20200202.tar