+[8.51] Archive, Branch View, Sort by Name, Load Selection

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

+[8.51] Archive, Branch View, Sort by Name, Load Selection

Post by *MVV »

Steps to reproduce:
1. Download tcm851x32.exe and extract INSTALL.CAB from it.
2. Enter INSTALL.CAB.
3. Switch to branch view (Ctrl+B).
4. Select some files and copy names to clipboard (cm_CopyNamesToClip) or file (cm_SaveSelectionToFile).
5. Set sorting by Type.
6. Deselect files and try to restore saved selection from clipboard (cm_LoadSelectionFromClip) or file (cm_LoadSelectionFromFile). TC selects files.
7. Set sorting by Name.
8. Repeat step 6. TC selects no files.

It is interesting that I can't reproduce bug using INSTALL.CAB from combined installer.
User avatar
petermad
Power Member
Power Member
Posts: 14816
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Hmm, I can confirm this if I start out with Name sorting. The the only sort methods where you can restore the selection with cm_LoadSelectionFromClip are Type and Size, but not with Name, Date or Unsorted.

If I start out with Unsorted view, then the only view where I can restore with cm_LoadSelectionFromClip is: Unsorted.

If I try the same with INSTALL.CAB from tcm851x64.exe everything works as expected.

But if I try this with INSTALL.CAB from tcm851x64.exe:
1. Set sorting to Type
2. Enter INSTALL.CAB and pres Ctrl+B
3. Select the files d\TOTALCMD.CHM, e\TOTALCMD.CHM and TC7Z64.DLL
4. Save the selection with cm_CopyNamesToClip or cm_CopyFullNamesToClip.
5. Clear the selection.
6. Restore the selection with cm_LoadSelectionFromClip -
ONLY TC7Z64.DLL is selected.

It seems that TC cannot restore selection of files in subfolders.


Tested with TC 8.51 32bit under Windows XP.

This also applies to TC 8.01
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Even if you have only DEFAULT.BAR in clipboard, TC can't restore selection for it, so I doubt that it is a subfolder problem. And, both 32 and 32+64 archives contain similar files and folders, however bug is reproduced only with some of them.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

These commands do not support branch view, it's more or less luck whether it works or not. I will check whether I can support it in a later release.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is strange that it was working in TC 7.50a, but in 7.56a it wasn't. And currently behaviour is quite unstable, it only works with some archives in some modes.


It seems that it doesn't work when first file in panel is from archive subdirectory. When I repack INSTALL.CAB w/o ARJ.PIF, TC restores selection correctly. Also I can reproduce problem with test archive with files "dir1\a.txt", "b.txt" and "c.txt", but can't if first file is not from archive subdirectory.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

First, cm_CopyNamesToClip does not save relative paths, just the names. Therefore it doesn't even work in normal directories when using branch view. The pair cm_SaveSelectionToFile / cm_LoadSelectionFromFile does work in normal directories, but isn't currently supported in archives. I will try to support it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14816
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

cm_CopyNamesToClip does not save relative paths, just the names.
How about cm_CopyFullNamesToClip ?

I use cm_CopyFullNamesToClip as the counterpart to cm_LoadSelectionFromClip - but that doesn't work for files in subfolders in Branch view either.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

We're talking about archives, cm_CopyFullNamesToClip has absolutely no sense here. Perhaps you should report branch view only issues in separate topic.
User avatar
petermad
Power Member
Power Member
Posts: 14816
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

We're talking about archives, cm_CopyFullNamesToClip has absolutely no sense here
cm_CopyFullNamesToClip works in archives too - output is like this:

drive:\archive.zip\directory\filename.ext

in contrary to cm_CopyNamesToClip that gives:

filename.ext

So that means that TC could actually extract the full name if cm_CopyFullNamesToClip had been use to save the file selection.

cm_CopyFullNamesToClip also works in an archive viewed in Branch mode - so there is no reason why TC shouldn't be able to restore the selection using cm_LoadSelectionFromClip - all the needed information is in the clipboard.

cm_CopyFullNamesToClip followed by cm_LoadSelectionFromClip works fine in Branch view outside archives in contrarary to:
First, cm_CopyNamesToClip does not save relative paths, just the names. Therefore it doesn't even work in normal directories when using branch view.
So I think is a relevant proposal to make the use of cm_CopyFullNamesToClip work in Branch view inside archives too.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Original bug is fixed in TC 8.51a final.

Christian, thank you for quick fix and for bug reason information (sent by e-mail).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!

We are still missing a function cm_saveselectiontoclip which would keep the relative paths, though. There was no time to add this because it would require translation, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It will be be a nice addition in the future. :)
User avatar
petermad
Power Member
Power Member
Posts: 14816
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

cm_CopyFullNamesToClip followed by cm_LoadSelectionFromClip works fine in Branch view outside archives
Hmm, I could have sworn it worked yesterday, but it doesn't, so a cm_saveselectiontoclip command would really be a welcomed addition.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply