+[TC 8.50 b5 + RAR.exe 5.0] Wrong archive packed

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MaxX
Power Member
Power Member
Posts: 1175
Joined: 2012-03-23, 18:15 UTC
Location: UA

+[TC 8.50 b5 + RAR.exe 5.0] Wrong archive packed

Post by *MaxX »

1. create some folder with space in it's name
2. copy in there some files (any you like)
3. create one more folder with space in it's name, open it in another side
4. select come of them -> Alt+F5 -> RAR > Ok
5. no archive packed to second folder (but can be found upper to it's tree)

e.g.
pack
c:\program files\program\some dir\some file.txt
to
c:\users\user\desktop\files dir\some file.rar
and get
c:\users\user\desktop\files.rar
instead of it.

Seems like TC or RAR.exe gets missed spaces and cuts off the filename.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Not reproducible with either TC8.50b5 32-bit or 64-bit (host OS is Windows 7 Pro x64).

I tried with both RAR.exe and WinRAR.exe (WinRAR 5.00, unregistered), and also tried using a fresh wincmd.ini.

The target path for the archive looked like this:

Code: Select all

rar:"c:\Users\User\Desktop\some dir\some file.rar"
Did you have some mishap with the quotes, perhaps?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I couldn't reproduce it either, I tried rar.exe and winrar.exe. Please send me more details, like the installation path of RAR, and your wincmd.ini settings from [Packer] section.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1175
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

Pack "D:\test.txt" to "E:\some text here\test.rar" and then get "E:\some.rar".
[Packer]
ARJlongnames=1
ExpertMode=1
InternalZipRate=9
NoDelete=1
OpenPartial=1
RemovableInTemp=1
zipnt=1
ACE=%COMMANDER_PATH%\Plugins\arc\Ace.exe -d4096 -m5 -s -c2 -o
ARJ=%COMMANDER_PATH%\Plugins\arc\Arj.exe -a+ -r+ -y+ -jm0 -jt+ -j$ -jh17000
LHA=%COMMANDER_PATH%\Plugins\arc\Lha.exe
LastUsedPacker=10000
DefPlugin=7z
RAR=%COMMANDER_PATH%\Plugins\arc\Rar.exe -m5 -s -t -scOl
UC2=%COMMANDER_PATH%\Plugins\arc\Uc2.exe
ZIPlikeDirectory=1
InternalUnarj=1
InternalUnlzh=1
InternalUnrar=1
InternalUnace=1
LinuxCompatible=1
InternalZip=1
InternalUnzip=1
ZIP=pkzip.exe
UnZIP=pkunzip.exe
Zip83Name=0
ZipSetDateToNewest=0
VerifyZIP=1
ZIPDirectoryOfFile=1
LastUsedPacker64=10000
;LzmaAllowed=1
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

I sort of can confirm the issue, with both 32-bit and 64-bit versions of TC8.50b5 and TC8.50b6.

The trigger condition seems to be the usage of %COMMANDER_PATH% together with command line parameters.

However, my result was slightly different from MaxX. In my case the resulting archive name was not truncated, but "somefile.rar" instead of the expected "some file.rar" (note the missing white-space).

Quotes and white-spaces in %COMMANDER_PATH% did not matter.
I tested with %COMMANDER_PATH% having no quotes (a-ka TC program directory without white-spaces), and having quotes (TC program dir with white-spaces).

Results were fine if i used the RAR command line

Code: Select all

"c:\Program Files\WinRAR\Rar.exe" -m5 -s -t -scOl
or this (note the missing command line parameters)

Code: Select all

%COMMANDER_PATH%\Plugins\arc\Rar.exe

UPDATE: The trigger does not specifically require the usage of the variable %COMMANDER_PATH%.

Having a TC install directory "X:\TCB5" and the RAR command line:

Code: Select all

X:\TCB5\Plugins\arc\Rar.exe -m5 -s -t -scOl
also triggers the problem.

More precisely: one of the two requirements to trigger the problem is not %COMMANDER_PATH%, but that the path of Rar.exe is within the TC program directory.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2elgonzo
It's probably caused by the command line parameters. Please try to specify it like this:
"X:\TCB5\Plugins\arc\Rar.exe" -m5 -s -t -scOl

or in MaxX's case:
RAR="%COMMANDER_PATH%\Plugins\arc\Rar.exe" -m5 -s -t -scOl

This way TC will know where the packer ends, and where the parameters start.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

@Ghisler:
Adding quotes works indeed.

But it is still a strange thing, going against the common knowledge of how command lines are to be built in MS Windows.
Add to this that the error symptoms do not really indicate what the problem might be and how to work around it...

I wonder whether this problem has been reported already in the German section of this forum, considering that on a German Windows you would usually install WinRar into C:\Programme\Winrar - a case where you usually don't think about applying quotes (since no white-space).
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Shouldn't TC know that the packer ends @ .exe ?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Balderstrom wrote:Shouldn't TC know that the packer ends @ .exe ?
No. You could have *.cmd or *.bat instead (or perhaps *.vbs if you desire so). Ideally, TC should treat the quote marks as what they are: not always mandatory...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I will try to handle the case where there are no quotes.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 7, please try it!
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Works, thanks!
Tested TC8.50b7 x32 + x64.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1175
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

Works fine.
Ukrainian Total Commander Translator. Feedback and discuss.
Post Reply