[BUG] Unpacking encrypted archives in separate folders
Moderators: Hacker, petermad, Stefan2, white
[BUG] Unpacking encrypted archives in separate folders
1. Suppose we have two encrypted RAR-archives: Arch1.rar and Arch2.rar.
2. Select them both, press Alt+F9, check Unpack each archive to a separate archive, press OK.
3. Result: the folder named Arch1 that contains files from Arch1.rar and inside it the folder Arch2 with files from Arch2.rar!
2. Select them both, press Alt+F9, check Unpack each archive to a separate archive, press OK.
3. Result: the folder named Arch1 that contains files from Arch1.rar and inside it the folder Arch2 with files from Arch2.rar!
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
XPEHOPE3KA
Cannot confirm your addition. In both cases (whether I check this option or not) I get two WinRAR dialogs.
Cannot confirm your addition. In both cases (whether I check this option or not) I get two WinRAR dialogs.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2Flint
Unfortunately I could not confirm your report. I checked my code - TC does pass the correct path to the unpacker in the following cases:
1. You do not modify the target path
2. You give an absolute path, e.g. c:\somewhere\else
3. You empty the target path field completely
TC does _not_ pass a correct full path if
4. You enter a relative path, e.g. somesubdir -> will be fixed
5. The length of archiver path+name, archive path+name, temp file path+name together is longer than 259 characters. I plan to support longer command lines in Total Commander 7.
Could case 5 be your problem? To check it, put a file named rartest.bat in your winrar directory containing the following lines:
echo %*
pause
If the command line is cut, you can change your TEMP and TMP environment variables to a shorter path, e.g. c:\temp
Unfortunately I could not confirm your report. I checked my code - TC does pass the correct path to the unpacker in the following cases:
1. You do not modify the target path
2. You give an absolute path, e.g. c:\somewhere\else
3. You empty the target path field completely
TC does _not_ pass a correct full path if
4. You enter a relative path, e.g. somesubdir -> will be fixed
5. The length of archiver path+name, archive path+name, temp file path+name together is longer than 259 characters. I plan to support longer command lines in Total Commander 7.
Could case 5 be your problem? To check it, put a file named rartest.bat in your winrar directory containing the following lines:
echo %*
pause
If the command line is cut, you can change your TEMP and TMP environment variables to a shorter path, e.g. c:\temp
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
ghisler(Author)
However, I wrote a simple my own program that outputs all the command-line parameters, called it test.exe and put into WinRAR folder, and then specified it as the RAR-unpacker in TC. And here is what it displayed (my two archives are in C:\tmp\ folder and I'm unpacking them into C:\Program Files\WinRAR\ folder):
First:
Second:
So, you can see that the path is already passed incorreclty!
<ADDED>
I've uploaded this test program here: http://flint-inc.ru/Temp/tc/testRAR.rar (16 kb). If someone wants to test it, just unpack the program test.exe into WinRAR folder, specify the full path to it in TC's Packer settings and try to unpack two encrypted archives. On each run my program opens the file C:\rar_test.txt (if it does not exist – creates it) and appends the line "NEW RUN!" followed by the full list of command-line parameters passed to it.
Hm... I use paths shorter than 259 chars.Could case 5 be your problem?
I did so, but it was no effect. Also I tried to specify this rartest.bat as the unpacker in TC - the console window just shows and immediately closes - I cannot see what was written there.To check it, put a file named rartest.bat in your winrar directory containing the following lines:
However, I wrote a simple my own program that outputs all the command-line parameters, called it test.exe and put into WinRAR folder, and then specified it as the RAR-unpacker in TC. And here is what it displayed (my two archives are in C:\tmp\ folder and I'm unpacking them into C:\Program Files\WinRAR\ folder):
First:
Code: Select all
argv[0] == 'C:\Program Files\WinRAR\test.exe'
argv[1] == 'x'
argv[2] == 'C:\tmp\Arch1.rar'
argv[3] == 'C:\PROGRA~1\WinRAR\Arch1'
argv[4] == '*.*'
Code: Select all
argv[0] == 'C:\Program Files\WinRAR\test.exe'
argv[1] == 'x'
argv[2] == 'C:\tmp\Arch2.rar'
argv[3] == 'C:\PROGRA~1\WinRAR\Arch1\Arch2'
argv[4] == '*.*'
<ADDED>
I've uploaded this test program here: http://flint-inc.ru/Temp/tc/testRAR.rar (16 kb). If someone wants to test it, just unpack the program test.exe into WinRAR folder, specify the full path to it in TC's Packer settings and try to unpack two encrypted archives. On each run my program opens the file C:\rar_test.txt (if it does not exist – creates it) and appends the line "NEW RUN!" followed by the full list of command-line parameters passed to it.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks for your test tool! I found out what the problem is: The target path is converted to the short DOS name if it contains spaces, so the path was cut off at the wrong character for the second file because it was shorter now! I will correct it for the next public beta.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Ok, in 6.55pb3 it is really fixed, thanks!
But there appeared another problem... When I unpack encrypted archives without the Unpack each archive to a separate subdir checkbox, the archives are unpacked in separate subdirs! And when I check this checkbox, the subdirs become duplicated (i.e. the archive Arch1.rar is unpacked into .\Arch1\Arch1\ subdir).
My test program showed however that the paths are the same in both cases, so I can't understand where the problem is.
I'm using WinXP SP2 eng, WinRAR 3.51, TC 6.55pb3; checkbox Use internal un-RAR if possible is turned on, as the RAR-packer I'm using the GUI-variant (WinRAR.exe).
But there appeared another problem... When I unpack encrypted archives without the Unpack each archive to a separate subdir checkbox, the archives are unpacked in separate subdirs! And when I check this checkbox, the subdirs become duplicated (i.e. the archive Arch1.rar is unpacked into .\Arch1\Arch1\ subdir).
My test program showed however that the paths are the same in both cases, so I can't understand where the problem is.

I'm using WinXP SP2 eng, WinRAR 3.51, TC 6.55pb3; checkbox Use internal un-RAR if possible is turned on, as the RAR-packer I'm using the GUI-variant (WinRAR.exe).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
NOT confirmed here.
I guess that you packed the directory with the files, so your archive contents looks like this:
Arch1.rar\Arch1\file
When you now unpack each archive (not to separate files), the paths inside the archive will be unpacked, so you get Arch1\file.
When you now additionaly choose to unpack each archive to a separate dir, a dir named like the archive will be created, and the archive with all its subdirs will be unpacked to it, resulting in Arch1\Arch1\file
Can you confirm that?
I guess that you packed the directory with the files, so your archive contents looks like this:
Arch1.rar\Arch1\file
When you now unpack each archive (not to separate files), the paths inside the archive will be unpacked, so you get Arch1\file.
When you now additionaly choose to unpack each archive to a separate dir, a dir named like the archive will be created, and the archive with all its subdirs will be unpacked to it, resulting in Arch1\Arch1\file
Can you confirm that?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
No, of course, this is not the case.
I checked twice that there are no subfolders inside the archive.
<EDIT>
However, here, on my home computer it all works fine, though all the programs and the settings are the same (that bug I found on my work computer), except that here I'm using WinXP SP2 rus, not eng. Tomorrow I'll try again at work and report the results.

<EDIT>
However, here, on my home computer it all works fine, though all the programs and the settings are the same (that bug I found on my work computer), except that here I'm using WinXP SP2 rus, not eng. Tomorrow I'll try again at work and report the results.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
I'm totally confused. On my work computer this bug is 100% reproducable! Here is the arhive I'm using for tests: http://flint-inc.ru/Temp/tc/UIDbgMon.rar (password is 123), so you can see for yourself that there are no subdirs. Here are exact steps what I'm doing:
1. I place this archive in C:\tmp\ folder.
2. On the right panel I open the C:\ root folder.
3. Press Alt+F9, Enter (Unpack each archive to a separate subdir is not checked!) – the WinRAR dialog opens.
4. I enter the password 123, press Enter.
5. In C:\ folder I get a new subfolder named UIDbgMon\ containing the file UIDbgMon.out from the archive.
The second scenario: absolutely the same, except that on the 3rd step I additionally chech the option Unpack each archive to a separate subdir. Then the result is: subfolder UIDbgMon\ with subfolder UIDbgMon\ inside it and this second subfolder (C:\UIDbgMon\UIDbgMon\) finally contains the file UIDbgMon.out.
So, I can only establish a fact that this bug is system-depentent, but I absolutely can't imagine what in particular may cause such an effect. This could be different WinRAR versions – but not, I'm using absolutely the same WinRAR 3.51 Russian version. This could be different TC versions – not, on both computers there is TC 6.55pb3.
Does anyone have any ideas?..
PS: Unfortunately, this is my last day on the work before vacation; if this bug is not reproduced by anyone, or will not appear on my computer in my hometown where I'm going to, I will be able to continue the experiments only in a month, when I'm back...
1. I place this archive in C:\tmp\ folder.
2. On the right panel I open the C:\ root folder.
3. Press Alt+F9, Enter (Unpack each archive to a separate subdir is not checked!) – the WinRAR dialog opens.
4. I enter the password 123, press Enter.
5. In C:\ folder I get a new subfolder named UIDbgMon\ containing the file UIDbgMon.out from the archive.
The second scenario: absolutely the same, except that on the 3rd step I additionally chech the option Unpack each archive to a separate subdir. Then the result is: subfolder UIDbgMon\ with subfolder UIDbgMon\ inside it and this second subfolder (C:\UIDbgMon\UIDbgMon\) finally contains the file UIDbgMon.out.
So, I can only establish a fact that this bug is system-depentent, but I absolutely can't imagine what in particular may cause such an effect. This could be different WinRAR versions – but not, I'm using absolutely the same WinRAR 3.51 Russian version. This could be different TC versions – not, on both computers there is TC 6.55pb3.
Does anyone have any ideas?..

PS: Unfortunately, this is my last day on the work before vacation; if this bug is not reproduced by anyone, or will not appear on my computer in my hometown where I'm going to, I will be able to continue the experiments only in a month, when I'm back...

Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
Sir_SiLvA
Hm... Which settings in particular? I think, you're right, the thing could be in WinRAR settings, but which of them?have u checked ur winrar settings ?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
Ok, I'll try then. Thanks for the tip!
BTW, now I'm sure that it's WinRAR, because when I turn off the option Use internal un-RAR if possible, any RAR-archive is unpacked into a separate directory.
BTW, now I'm sure that it's WinRAR, because when I turn off the option Use internal un-RAR if possible, any RAR-archive is unpacked into a separate directory.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64