Wrong pack dialog suggestion string

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

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:

Wrong pack dialog suggestion string

Post by *DrShark »

Usually when you try to pack one file with, the dialog box will suggest archive name from file name:
Press Alt+F5 on c:\totalcmd\tcignore.HLP, dialog will suggset name like zip:G:\something\tcignore.ZIP
However sometimes this dialog somewhy suggsets the file name from it's parent dir: zip:G:\something\totalcmd.ZIP.
Well, you won't reproduce it with tcignore.hlp... It was not easy to catch directory tree to reproduce such behaviour at least on two systems (Vista HP and XP SP2 Pro).
To create tree, put bat file with next content to root of any drive and execute it:

Code: Select all

md \temp\rytoryka\aac\Rytoryka_Lection_19_09_2008\
cd \temp\rytoryka\aac\
echo > Rytoryka_audio_Lection_19_09_2008.rar
echo > Rytoryka_Lections_multipage.tif
echo > Rytoryka_Lections_multipage.rar
Then open temp\rytoryka\aac\ in total commander panel and press Alt+F5 on any file.
Dialog will suggest something like zip:C:\path\aac.zip.
Reproduced using Total Commander 7.04 & 7.04a.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

This behavior is by design and follows the rule:

Single file to pack => use filename as template
Multiple file to pack => use parent folder as template
#5767 Personal license
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

sqa_wizard wrote:Multiple file to pack => use parent folder as template
This case breaks that rule:
... and press Alt+F5 on any file.
it means any one file. You even don't have to select it, just mark it with cursor and press alt+f5 or call pack dialog from file menu.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Henrie
Member
Member
Posts: 194
Joined: 2006-09-03, 23:12 UTC
Location: Volkel, the Netherlands

Post by *Henrie »

DrShark, i have different results (using Total Commander 7.04a).

The .rar-archives get a suggested name with name of dir (zip:G:\aac.zip)
The .tiff fille and the folder get a suggested name that is their own name. (zip:G:\Rytoryka_Lections_multipage.zip and zip:G:\Rytoryka_Lection_19_09_2008.zip)

Greetings,
Henrie
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

it means any one file.
No :) ... if you select a RAR item you do not select a file, but a directory !

Why ?

Open your main menu:
Configuration - Options - Packer

The very top item says "Treat archives like directories" and I bet it is checked ;)

If you disable this option, you will get the file behavior back, but who wants this ...
#5767 Personal license
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Henrie wrote:The .tiff fille and the folder get a suggested name that is their own name. (zip:G:\Rytoryka_Lections_multipage.zip and zip:G:\Rytoryka_Lection_19_09_2008.zip)
You're right.
sqa_wizard wrote:The very top item says "Treat archives like directories" and I bet it is checked

If you disable this option, you will get the file behavior back, but who wants this ...
I disabled it, but for *.rar alt+F5 on these rars still suggests parent directory.
Anyway, for selected directory Alt+F5 suggests selected directory name, not parent. So looks like something wrong with extensions, associated with internal/external packers or wcx plugins.
Maybe TC force name parentdir.arc instead of filename.arc because otherwise it will create archives like filename.rar.zip etc... But I think, if it's true, this should be optional.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply