Drag to [..] in archive's subdirectory unpacks a file

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Drag to [..] in archive's subdirectory unpacks a file

Post by *DrShark »

To reproduce:
1. Pack file c:\dir1\ which has subdr dir2 with file test.ext inside of dir2.
You'll get archive with directory structure archive.zip/dir1/dir2/test.ext
2. Enter into archive, go into dir2/
3. Drag a file test.ext on [..] entry above.
Expected: "Unpack files" dialog should suggest to copy file from zip's dir2/ to zip's dir1/ (archive.zip/dir1/).
What happens: "Unpack files" suggests to actually unpack file from archive.

Maybe this is intentional, but highly unexpected.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Drag to [..] in archive's subdirectory unpacks a file

Post by *ghisler(Author) »

This is intentional and will not be changed, because copying within a zip isn't supported.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Drag to [..] in archive's subdirectory unpacks a file

Post by *DrShark »

ghisler(Author) wrote: 2019-03-26, 14:08 UTC This is intentional and will not be changed, because copying within a zip isn't supported.
It is supported with Pack files dialog (try to copy with F5 in same zip with different dirs of zip opened in panels).
I think it's correct to use Pack files dialog in this case.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Drag to [..] in archive's subdirectory unpacks a file

Post by *DrShark »

I know a fix of this requires major changes (different handling of drag&drop to [..] or arhive path parts in current directory path to call a Copy dialog in such cases; or maybe Unpack and Copy dialog merging), but I hope such changes will be considered for next major release.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Drag to [..] in archive's subdirectory unpacks a file

Post by *ghisler(Author) »

Sorry, it is not planned to change this. It is very convenient to unpack files this way. I use it quite often, and I guess that many other people use it too.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Drag to [..] in archive's subdirectory unpacks a file

Post by *DrShark »

ghisler(Author) wrote: 2019-03-31, 06:57 UTC Sorry, it is not planned to change this. It is very convenient to unpack files this way. I use it quite often, and I guess that many other people use it too.
Maybe, good point. Why not make it optional?
Anywhay, how about following cases:
1. If user manually changes a path in Unpack dialog from external dir, where file should be unpacked by default, to a subdir of archive, why don't copy to subdir then (directly, or by calling additional Copy dialog with archive subdir path pre-set after user wil press OK in Unpack dialog)?
2. Also, it's a different when user is dragging a file in archive to it's subdirectory either in panel or current directory path. Currently there are two limitations here:
a) drag to archive's subdirectory in current or opposite panel doesn't work: TC just doesn't allow a drop action on it in current panel, and for opposite panel it allows drag&drop to panel itself, not its subdirectories (although here it's possible to add subdirectory manually editing a path in Copy dialog.) It is an artificial limitation;
b) drag to a sub/supdirectory (relative to file/dir we're dragging) in current directory path of current or opposite panel calls
Unpack dialog with correct in-archive sub/subdirectory set, but pressing OK in Unpack dialog results meaningless

Code: Select all

---------------------------
Total Commander
---------------------------
Access denied!

C:\test.zip\dir\

---------------------------
ОК   As Administrator
---------------------------
Pressing "As Administrator" there results an error:

Code: Select all

---------------------------
Total Commander
---------------------------
Error: Directory [dir]
not created!
---------------------------
ОК   
---------------------------
which means TC tries to create test.zip\dir\ instead of copying files/folders dragged on \dir\ in current directory path.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply