Extract from tar fails. Most likely because path is too long

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Flarna
Junior Member
Junior Member
Posts: 12
Joined: 2011-04-02, 20:31 UTC

Extract from tar fails. Most likely because path is too long

Post by *Flarna »

Steps to reproduce (using TC 9.12 64Bit):
- Download NodeJs 9.2.0 source (https://nodejs.org/dist/v9.2.0/node-v9.2.0.tar.gz)
- Extract tar archive from gzip (works fine)
- Extract all files from tar into some folder, keep folder structure

Expected: Extract of all files works
Actual: Extract fails.

If I extract the same archive using 7-zip it works fine (and is also faster :wink:).

I assume the reason is that the path of some file in the tar is too long for standard windows APIs (e.a. prefix "\\?\" needed).
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Confirmed, also that it's related to long path names. This is broken since at least 9.0 beta4. TC8 warns about the long files and asks whether to keep them. Newer versions just show an error "Access denied on target file" with the options Skip, Retry, Cancel and Rename.

I only tested TC 32 bit, but I guess it's the same in TC 64 bit.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

This is where TC fails the first time:
node-v9.2.0\deps\npm\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\registry-url\node_modules\rc\node_modules\

which is only read as node-v9.2.0\deps\npm\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\registry-url\node_modules\rc\node_modu

But that is only 156 characters long which is below Windows 259 charaters limit.

If I configure TC to use Total7zip for .tar files (tar=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx) I can unpack the sample file.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Flarna
Junior Member
Junior Member
Posts: 12
Joined: 2011-04-02, 20:31 UTC

Post by *Flarna »

Ok, so seems to be more an issue in combining [face=courier]Filename prefix[/face] and [face=courier]File name[/face] fields of tar header which is cut off at 156 chars instead of allowing 255 chars.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

The archive itself can be extracted just fine when the destination is something like D:\node, but only in TC 9.x 32 bit. However, when the destination is D:\node\node\node\node\node\node\node\node\node\node TC 32 bit fails to do so with the error I mentioned above.

Conclusion: There are two different bugs/errors, one in TC 32 bit and another one in TC 64 bit.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Here unpacking to G:\ fails at the same level in both TC 9.12 32bit and 64bit - the unpacking stops after 8.903 / 15.567 files (99,9 M / 141,8 M) 70% with the same error message:
"Access denied on file"
G:\node-v9.2.0\deps\npm\..\registry-...\node_modules\rc\node_modul
Interestingly the file count when unpacking with internal tar- unpacker and with Total7zip plugin is the same: 15.567 - so apparantly the internal tar unpacker can read all the file entries.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check it, thanks.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in TC 9.20 beta 1, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Confirm the bugfix for TC 9.20 beta1 (32 bit); didn't test TC 64 bit. TC 9.20 beta1 behaves the same as TC 8.52a and warns about long paths asking whether or not to keep them.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Flarna
Junior Member
Junior Member
Posts: 12
Joined: 2011-04-02, 20:31 UTC

Post by *Flarna »

Tested 64Bit variant of 9.20b1 and it looks good.

Thanks!
Post Reply