[8.01] Bug: packing wrong RAR

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

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

[8.01] Bug: packing wrong RAR

Post by *MaxX »

My step-by-step actions:
1. Open exisiting file
"E:\LibAll\!LibUPD\Komp\ProHard\Тестовые таблицы фотокамеры.rar"
in left panel
2. Open e:\Web\ dir on right.
3. Select files
"На примере миры Sony XR500.jpg"
and
"FAQ_ Реальное разрешение по мире ISO 12233 - Форум VIDEOMAX - Страница 1.mht"
on right
4. Press F5 or F6
5. In appearing dialog see this string
rar:"e:\LibAll\!LibUPD\Komp\ProHard\Тестовые таблицы фотокамеры.rar"
6. Don't change anything, just click OK
7. Original
"E:\LibAll\!LibUPD\Komp\ProHard\Тестовые таблицы фотокамеры.rar"
in not modified, but I get new archive file
"E:\LibAll\!LibUPD\Komp\ProHard\Тестовые.rar".

Notes:
* If I try TC 7.57a I get RAR's gui-message (but I use console version!) that there's wrong parameter (which parameter?).
* If I remove spaces in existing file name, files are packed normally.
* If I pack and than update existing 7z with same path and filename (don't remove spaces) - files are also packed normally.

For 7zip I use 7zip.wcx plugin (the newest version).
For RAR I use RAR.exe 4.20 with Wincmd.ini string: RAR=%COMMANDER_PATH%\Plugins\arc\Rar.exe -m5 -s -t
I've used this string for years without any shanges and nothing was wrong all this time before.

What's the problem?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please try using WinRAR.EXE instead of RAR.EXE. There are many problems with RAR.EXE and non-English names.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2ghisler(Author)
For many reasons I can't use gui version.
So, you mean that's rar's problem?
Ukrainian Total Commander Translator. Feedback and discuss.
dracodoc
Junior Member
Junior Member
Posts: 25
Joined: 2011-01-05, 15:16 UTC

Post by *dracodoc »

Looks like the file name including space, so when the parameter was not transferred correctly, only the part before space was recognized as file name.
Biozynotiker
Member
Member
Posts: 164
Joined: 2011-03-22, 09:57 UTC
Location: Germany

Post by *Biozynotiker »

That's the reason i wrote a wrapper for rar.exe, because TC creates different filelists,
if TC not detect filename "winrar.exe" and file version higher than V2.5.0.0.

In my case the wrapper is named "winrar.exe", with fileversion string V4.20.0.0, and parse all
commands that to the real rar.exe.

Maybe you try to rename the rar.exe to winrar.exe for a test, and add "-scul" to the command line string.

Sure whit this method has some drawbacks:
- the archivename itself must be ansi, not unicode
- adding files to an existing unicode folder in the archive doesn't work, but you can add/delete/etc. selected unicode filesnames and folders to a ansi folder inside the archive
(thats because rar.exe can't handle unicode working dirs (-w) from command line )
#92832
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

the archivename itself must be ansi, not unicode
most of my archives are unicode-named
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6490
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

MaxX wrote:2ghisler(Author)
For many reasons I can't use gui version.
So, you mean that's rar's problem?
Sorry, but there is no valid reason not to use winrar.exe,
if you have a licensed version of winrar.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2Horst.Epp
I have, but there's no diffrece. Both of them get parameters from command-line in same way...

Edit: Just now I tried to pack my arch with gui-version -> I get error that WinRAR.exe can't open file "```````````.rar" (here I write "`", because there are unknown for me symbols and japanese/chinese hieroglyphs and I can't copy them)
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

Update for reproducing!

Much easier way to get a bug:
1. Create any file like "test aaa.txt"
2. Pack it with RAR to any dir
3. Rename "testaaa.rar" to "test aaa.rar" and enter inside it
4. Copy "test aaa.txt" to "test aaa 2.txt" and try to update archive with it.
5. Here's the bug:
console -> file is being packed to another archive "test.rar"
gui -> an error with non-existing archive

TC 8.01 final + RAR.exe/WinRAR.exe 4.20 final
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6490
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

MaxX wrote:Update for reproducing!

Much easier way to get a bug:
1. Create any file like "test aaa.txt"
2. Pack it with RAR to any dir
3. Rename "testaaa.rar" to "test aaa.rar" and enter inside it
4. Copy "test aaa.txt" to "test aaa 2.txt" and try to update archive with it.
5. Here's the bug:
console -> file is being packed to another archive "test.rar"
gui -> an error with non-existing archive

TC 8.01 final + RAR.exe/WinRAR.exe 4.20 final
No problem here using TC 8.01 x64 and Winrar.exe (version 3.62).
The archive is updated without any problem.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2Horst.Epp
and what about 4.20?
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Much easier way to get a bug:
1. Create any file like "test aaa.txt"
2. Pack it with RAR to any dir
3. Rename "testaaa.rar" to "test aaa.rar" and enter inside it
4. Copy "test aaa.txt" to "test aaa 2.txt" and try to update archive with it.
5. Here's the bug:
console -> file is being packed to another archive "test.rar"
gui -> an error with non-existing archive
I just tried this with rar.exe 4.20 - both with and without -m5 -s -t as parameters - no problems with neither TC 8.01 64bit or 32bit.

In TC 8.01 x64 I have tested with both the 32bit and the 64bit version of rar.exe.

I had no unicode characters in neither source nor target dir when testing this.


One thing I don't understand is this:
3. Rename "testaaa.rar" to "test aaa.rar"
If I press Alt+F5 on "text aaa.txt" TC will automatically pack it to "test aaa.rar" - I have no need to rename the file. But just to make sure I also did a test where I deliberately packed to "testaaa.rar" and renamed the file to "test aaa.rar" afterwards - still no problems adding "test aaa2.txt" to "test aaa.rar"


EDIT: I did another test with the same filenames as in your first posting. I have no problems adding the files: "На примере миры Sony XR500.jpg" and "FAQ_ Реальное разрешение по мире ISO 12233 - Форум VIDEOMAX - Страница 1.mht" to "E:\LibAll\!LibUPD\Komp\ProHard\Тестовые таблицы фотокамеры.rar" - but I cannot delete the two files from the archive again - I get the message:
---------------------------
rar
---------------------------
Error packing files!
---------------------------
OK
---------------------------
I can extract the two files though, and I can still add other files to the archive, and delete files that were already there (with non-unicode names).

If I use WINrar.exe in stead of rar.exe in TC's packer configuration, I can delete the two files.
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
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2petermad,
I mean adding the renamed copy of our txt-file to archive having a first one inside.
TC will automatically pack it to "test aaa.rar" - I have no need to rename the file
There's normal name in "Alt+F5 dialog". But after packing archive all the spaces in the "*.rar" name are lost (personally I don't remove any character).
Does your RAR-packer NOT lose spaces in newly created "*.rar"s??? :O
Biozynotiker
Member
Member
Posts: 164
Joined: 2011-03-22, 09:57 UTC
Location: Germany

Post by *Biozynotiker »

Horst.Epp wrote:Sorry, but there is no valid reason not to use winrar.exe,
if you have a licensed version of winrar.
- Winrar.exe is not portable at all, it creates tons of trash in user profile and registry. Rar.exe has no such problems
- Winrar doesn't really work well on WinPE, TC and Rar.exe does.
- Winrar's progressdialog is ugly
#92832
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6490
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

Biozynotiker wrote:
Horst.Epp wrote:Sorry, but there is no valid reason not to use winrar.exe,
if you have a licensed version of winrar.
- Winrar.exe is not portable at all, it creates tons of trash in user profile and registry. Rar.exe has no such problems
- Winrar doesn't really work well on WinPE, TC and Rar.exe does.
- Winrar's progressdialog is ugly
But as you can read from others, rar.exe doesn't handle Unicode
so you have to decide anyway.
Also there is a portable winrar which I'm using from USB stick
Post Reply