7.02a expand rar to folder with blanks and - causes errormsg

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

7.02a expand rar to folder with blanks and - causes errormsg

Post by *xrmb »

I just tried to extract a rar file named "e:\input\lalala lululul - mumumu mamama.rar" to "e:\test\lalala lululul - mumumu mamama". When I start with alt+f9 I get an error from Winrar "unknown option" or similar.

The problem is that TC does not quote the target dir, so this command is executed:

"D:\Program Files\WinRAR\WinRAR.exe" x "e:\input\lalala lululul - mumumu mamama.rar" e:\test\lalala lululul - mumumu mamama *.*

I think the correct command would be:
"D:\Program Files\WinRAR\WinRAR.exe" x "e:\input\lalala lululul - mumumu mamama.rar" "e:\test\lalala lululul - mumumu mamama" *.*

the error message is probably the "-" from the target dir, where winrar doesnt know what it means.

Surprisingly everything works, even with the bogus command line.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

NOT confirmed. Everything works fine here, Win2k SP4, TC7.02a, WinRAR 3.62.

In TC's options as path to RAR-packer I use WinRAR.exe (NOT rar.exe).
Besides that: don't you have the option "Use internal un-RAR if possible" checked? This also runs without problems here.

Some analysis:
The parameters passed to WinRAR are (according to Flint's testRAR.exe, download link see in this post):

Code: Select all

NEW RUN!
--------
argv[0] == 'D:\path\testRAR.exe'
argv[1] == 'x'
argv[2] == 'E:\input\lalala lululul - mumumu mamama.rar'
argv[3] == 'E:\test\LALALA~1'
argv[4] == '*.*'
So a short 8.3 name is used for the target dir here automatically, even using a fresh TC INI-file (with only path to WinRAR set).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, it must be the minus sign - WinRAR probably interprets it as the start of a switch (command line options).
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2ghisler(Author)
Yes, it must be the minus sign - WinRAR probably interprets it as the start of a switch (command line options).
Hm, indirectly the minus sign, if this really was the command line:
xrmb wrote:The problem is that TC does not quote the target dir, so this command is executed:
"D:\Program Files\WinRAR\WinRAR.exe" x "e:\input\lalala lululul - mumumu mamama.rar" e:\test\lalala lululul - mumumu mamama *.*
Tested in command line:
  • d:\path\WinRAR\WinRAR.exe x "e:\input\lalala lululul - mumumu mamama.rar" "E:\test\lalala lululul - mumumu mamama"
Works without any problem here - while the version without quotes throws some error messages (of course?).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

ok, I seem to be pretty unlucky with my last two bug reports :) Let me see if I can show you the problem.

It seems to be even more tricky.

1. Win2k Server, SP2
2. Create 8.3 Filenames disabled on NTFS drives (thats key, dont know how I did that :)
3. use internal rar if possible checked, I'm using winrar.exe to expand as backup
4. the rar itself is a multi file rar .part1.rar, .part2.rar


for 2:
D:\my downloads>dir /x
Volume in drive D is workspace
Volume Serial Number is 30F3-1596

Directory of D:\my downloads

09/20/2007 10:12 AM <DIR> .
09/20/2007 10:12 AM <DIR> ..
08/16/2007 09:21 PM 16,609,480 ActivePerl-5.8.8.822-MSWin32-x86-280952.msi
04/18/2007 06:53 PM 1,274,079 awstats-6.6.zip

as you can see, no short names...

while one another PC with NTFS:
E:\1\a b - c d>dir /x
Volume in drive E is STUFF
Volume Serial Number is A0F8-925D

Directory of E:\1\a b - c d

09/20/2007 19:51 <DIR> .
09/20/2007 19:51 <DIR> ..
07/10/2007 18:04 79,794 AB-CD~1.PDF a b - c d.pdf

video coming next ;)
I was born with Norton Commander, grew up with DCC, after school I played with Windows Commander, graduated, married and had kids with Total Commander and will die using whatever its called then Commander.
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

ok, and here is the video you all have been waiting for:
http://home.comcast.net/~xrmb/files/tc_bug_winrardir.avi

How to Disable the 8.3 Name Creation on NTFS Partitions
http://support.microsoft.com/kb/121007

this has to be done before the target folder is created.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2xrmb
The video can't be displayed on my current PC, I'll try on another later.
Maybe cou could apply a run of testRAR.exe in the meantime (as written above): download link is in this post
How it works:
  • - copy testRAR.exe into Winrar-directory
    - in TC change the path to WinRAR.exe into testRAR.exe
    - perform the action you want to test
=> the file c:\test_rar.txt is created, containing all passed parameters seperately.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

The video is a xvid at 1280x1024, just downloaded it and watched in Media Player Classic

here the log:
NEW RUN!
--------
argv[0] == 'D:\Program Files\WinRAR\test.exe'
argv[1] == 'x'
argv[2] == 'D:\my downloads\test.rar'
argv[3] == 'D:\MYDOWN~1\a'
argv[4] == '-'
argv[5] == 'b'
argv[6] == '*.*'


you can see that "D:\my downloads\a - b" only has a 8.3 name for my downloads, the "a - b" doesnt have one... I think thats where the problem is, and why I'm probably the first one with the problem... who has 8.3 names disabled?
I was born with Norton Commander, grew up with DCC, after school I played with Windows Commander, graduated, married and had kids with Total Commander and will die using whatever its called then Commander.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1049
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Maybe this doesn't help in this case but anyway:

Switch -- - stop switches scanning
--------------------------------------------------------------------------------
This switch tells to WinRAR that there are no more switches in the command line. It could be useful, if either archive or file name starts from '-' character. Without '--' switch such a name would be treated as a switch.

Example
add all files from the current folder to the solid archive -StrangeName

WinRAR a -s -- -StrangeName
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

it would be enough to put the target directory in quotes, so it becomes one argument. Its done for the input file, why not for the output/target?
I was born with Norton Commander, grew up with DCC, after school I played with Windows Commander, graduated, married and had kids with Total Commander and will die using whatever its called then Commander.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2xrmb
watched in Media Player Classic
It's maybe a missing plugin/codec here. I could watch most of it using VLC media player now.
Your error and result looks very similar to what I get here, if I call it without quotes manually...
you can see that "D:\my downloads\a - b" only has a 8.3 name for my downloads, the "a - b" doesnt have one... I think thats where the problem is, and why I'm probably the first one with the problem... who has 8.3 names disabled?
Indeed, even MS does "not recommend" this, IIRC... :)
I wonder what TC would pass to WinRAR for a longer LFN having no 8.3 alternative (maybe the long file name, cut after 8 characters?)...
it would be enough to put the target directory in quotes
Agree and tested: this should work and do no harm. Even when using the alternative short name of the target, it also works with quotes (here on Win2k SP4, WinRAR 3.62).

:arrow: So I'd vote for letting TC add quotes...
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

I think TC is pretty smart already (thats no news), it tries to send the short/8.3 path to Winrar, since it should behave the same way, but saves many characters which could be helpful for long command lines.

It looks that if no short path can be found the long path is send (smart), but I guess Christian assumes that for each long path there is a short path, and blanks are not valid in 8.3 short names.

So I'd vote for letting TC add quotes... Me too, me too, so I can be the only person on the planet that has 8.3 disabled ;)
I was born with Norton Commander, grew up with DCC, after school I played with Windows Commander, graduated, married and had kids with Total Commander and will die using whatever its called then Commander.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Create 8.3 Filenames disabled on NTFS drives
Ah, that's the point! TC indeed tries to pass the short DOS target path to WinRAR to avoid that the command line becomes too long, and to avoid problems with spaces, but this fails because short names are turned off.

I really cannot recommend turning off the 8.3 names. They don't cost much performance and disk space, but are needed by TC in many places...
Author of Total Commander
https://www.ghisler.com
User avatar
xrmb
Junior Member
Junior Member
Posts: 63
Joined: 2003-04-05, 16:54 UTC

Post by *xrmb »

Yes I turned it back on, rebooted, works fine... maybe something for the future to remember, there might be a time when short filenames are gone... in 20 years or so :)
I was born with Norton Commander, grew up with DCC, after school I played with Windows Commander, graduated, married and had kids with Total Commander and will die using whatever its called then Commander.
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Fixed in 7.03.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Post Reply