File size is determined incorrectly
shlyakpavel opened this issue · comments
Hello. I'm running Arqiver on Mac OS
In some archives file size is set to 0 for all files like on the attached screenshot while on others everything is okay.
You can find the problematic archive in the attachment
BullsAndCows.zip
Both archives are extracted correctly. It is so selective only when it comes to file sizes
@tsujan I have tested it already on linux as mentioned here #6 (comment)
libarchive is not the same on Mac
But it works most of the time. There must be a bug either in lib archive or in Arqiver. It needs debugging. What should I start with?
Arqiver is surely not free of bugs (actually, a week ago, I found a bug, which I'll fix later) but I think if this was a problem in Arqiver, it should happen on Linux too. So, the problem is either in Mac's libarchive
or in Arqiver's Mac support (which is missing. of course).
In backends.cpp
, you can see these lines:
#ifdef Q_OS_LINUX
#define TAR_CMD "bsdtar"
#else
#define TAR_CMD "tar"
#endif
They are for Linux and *BSD. There's no Mac support at all.
It needs debugging. What should I start with?
I don't think there's a way: it isn't a crash with a backtrace and I don't think gdb arqiver
could reveal anything. If the problem was reproducible here, I could investigate the code.
BTW, your second screenshot shows what happens when the icon set is poor. I might add a workaround for that later, although the problem isn't in the app.
Update:
Arqiver should use tar
with Mac, while it uses bsdtar
on Linux (which is like tar
on BSD). So, it's just by chance that it works with some archives in Mac ;)
I close this because the reported behavior is expected. Tell me if you could find a good Mac support (but I think, in the case of Arqiver, it may be very difficult).
@tsujan Mac shares the same bsdtar with bsd
I believe the problem is more general
They are for Linux and *BSD. There's no Mac support at all.
That's what I wanna bring here
I don't think there's a way: it isn't a crash with a backtrace
It is possible to track what functions return and current variable status. I just need to know where to put breakpoints