+Parameters size drops 253 chars after deleting a button
Moderators: Hacker, petermad, Stefan2, white
+Parameters size drops 253 chars after deleting a button
This may be important bug.
In order to produce the bug:
1) Add the following button twice at the end of any button bar:
TOTALCMD#BAR#DATA
%COMSPEC% /k echo
########10########20########30########40########50########60########70########80########90#######100#######110#######120#######130#######140#######150#######160#######170#######180#######190#######200#######210#######220#######230#######240#######250#######260#######270#######280#######290#######300
%COMMANDER_PATH%\TOTALCMD.EXE,2
TestButton
-1
2) Remove the first added button (just before the last one)
3) The parameter size of secondly added button (last one) is automatically trimmed to 253 characters!
For general case, when a button deleted in a button bar, the parameter size of the remaining buttons are reduced to 253 characters!
EDIT > Win7x64 + TC8.51RC2
In order to produce the bug:
1) Add the following button twice at the end of any button bar:
TOTALCMD#BAR#DATA
%COMSPEC% /k echo
########10########20########30########40########50########60########70########80########90#######100#######110#######120#######130#######140#######150#######160#######170#######180#######190#######200#######210#######220#######230#######240#######250#######260#######270#######280#######290#######300
%COMMANDER_PATH%\TOTALCMD.EXE,2
TestButton
-1
2) Remove the first added button (just before the last one)
3) The parameter size of secondly added button (last one) is automatically trimmed to 253 characters!
For general case, when a button deleted in a button bar, the parameter size of the remaining buttons are reduced to 253 characters!
EDIT > Win7x64 + TC8.51RC2
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Confirmed, thanks! The code in the 64-bit version wasn't updated for the longer parameters, only in the 32-bit version.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks!Tested with TC8.51RC3 x32 & x64 in Win7 x64 -> No problem
DoesNote: When I copy the above button bar definition text (TOTALCMD#BAR#DATA ... -1) to clipboard and paste it on a button bar, the icon index is not considered.
%COMMANDER_PATH%\TOTALCMD.EXE
exist?
It works fine here when it does exist. If it doesn't exist, I get the default TC icon, e.g. when pasting this to a 64-bit only installation. However, it does work when I change this to
%COMMANDER_PATH%\TOTALCMD64.EXE
Can you confirm this?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
No. TOTALCMD.EXE and TOTALCMD64.EXE are in same dir.Can you confirm this?
I don't know how it works fine there and what is wrong in my case. When I paste the above button clipboard text to button bar, Icon file field box of the button becomes as follows :
Icon file : %COMMANDER_PATH%\TOTALCMD.EXE
or
Icon file : %COMMANDER_PATH%\TOTALCMD64.EXE
Actually it should be as follows:
Icon file : %COMMANDER_PATH%\TOTALCMD.EXE,2
or
Icon file : %COMMANDER_PATH%\TOTALCMD64.EXE,2
EDIT > Could you please try it by copying the button id text to clipboard on forum page and pasting to button bar then? May the reason be due to carriage return character?
EDIT2> Problem is this: when I paste the above button id text to button bar, icon is not displayed immediately. When I open dialog to change and just press the OK button. Icon is displayed correctly. Sorry, I couldn't define the problem correctly.
2ghisler(Author)
I don't - I get TC's DOS icon - which I am supposed to, since that is the one that has index 2 - so how can you get icon 0?It works fine here when it does exist. If it doesn't exist, I get the default TC icon
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I only get icon 0 when the program file
%COMMANDER_PATH%\TOTALCMD.EXE
does NOT exist.
%COMMANDER_PATH%\TOTALCMD.EXE
does NOT exist.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
When %COMMANDER_PATH%\TOTALCMD.EXE does not exist (running 64bit version installed non-combined with 32bit version) I get a blank icon - is that what you call "the default TC icon" ?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, I can't make that happen - can anyone else?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
petermad wrote:
2) Even if %COMMANDER_PATH%\TOTALCMD.EXE exist (running 64bit version installed combined with 32bit version) I still get a blank icon.
3) After Right mouse click + change => I see Icon number as 2 (even if the icon is not displayed on button).
Is this normal? Doesn't TC display/refresh the icon on button immediately?
petermad wrote:
2) After I paste the button clipboard text to a button bar, I still get blank icon.
3) After Right mouse click + change => I see Icon number as 2 (but icon previews are not displayed)
1) I paste the button clipboard text to a button barWhen %COMMANDER_PATH%\TOTALCMD.EXE does not exist (running 64bit version installed non-combined with 32bit version) I get a blank icon
2) Even if %COMMANDER_PATH%\TOTALCMD.EXE exist (running 64bit version installed combined with 32bit version) I still get a blank icon.
3) After Right mouse click + change => I see Icon number as 2 (even if the icon is not displayed on button).
Is this normal? Doesn't TC display/refresh the icon on button immediately?
petermad wrote:
1) I renamed TOTALCMD.EXE to TOTALCMDxxx.EXE temporarilyHmm, I can't make that happen - can anyone else?
2) After I paste the button clipboard text to a button bar, I still get blank icon.
3) After Right mouse click + change => I see Icon number as 2 (but icon previews are not displayed)
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, no idea why I get a floppy icon - maybe because I have totalcmd.exe somewhere in the path. Anyway, it is irrelevant here, it only matters what happens when the icon file does exist.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
May the reason be that TC does not resolve the %COMMANDER_PATH% for this case?
EDIT> Sorry, It is not.
EDIT2> I think I found the problem in my case.
The reason of the blank icon is a space character at last in the icon definition string : %COMMANDER_PATH%\TOTALCMD.EXE,2
When I remove that space character at last, icon is displayed correctly after paste. I don't know how it came to there. But, I see that this is open to have mistake.
Before paste, is it possible to remove the preceding/following spaces (trim) in the line(s) of button clipboard text?
EDIT> Sorry, It is not.
EDIT2> I think I found the problem in my case.
The reason of the blank icon is a space character at last in the icon definition string : %COMMANDER_PATH%\TOTALCMD.EXE,2
When I remove that space character at last, icon is displayed correctly after paste. I don't know how it came to there. But, I see that this is open to have mistake.
Before paste, is it possible to remove the preceding/following spaces (trim) in the line(s) of button clipboard text?
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Ah, I see - some browsers seem to copy a space at the end of a line although there isn't any.
This function was meant to be used together with "Copy" from the same context menu, which doesn't append any unnecessary spaces...Before paste, is it possible to remove the preceding/following spaces (trim) in the line(s) of button clipboard text?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com