TCMAMDIN loses filename case when unpacking w/overwriting
Moderators: Hacker, petermad, Stefan2, white
TCMAMDIN loses filename case when unpacking w/overwriting
It is an old bug (or just missed feature).
I like that TC keeps filename case when overwriting file (e.g. I keep filenames in nice case and when updating files, names are kept).
But when I unpack files with overwriting using TCMADMIN, they get exact name of unpacked file (including characters case).
E.g. if existing file has name MultiTool.dll and file in archive have name multitool.dll, after unpacking using just TC name will be MultiTool.dll as expected, but when unpacking using TCMADMIN, name will be multitool.dll.
I like that TC keeps filename case when overwriting file (e.g. I keep filenames in nice case and when updating files, names are kept).
But when I unpack files with overwriting using TCMADMIN, they get exact name of unpacked file (including characters case).
E.g. if existing file has name MultiTool.dll and file in archive have name multitool.dll, after unpacking using just TC name will be MultiTool.dll as expected, but when unpacking using TCMADMIN, name will be multitool.dll.
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately this cannot be prevented: tcmadmin doesn't really unpack itself. What happens is that TC unpacks the files to TEMP, and tcmadmin then copies them with CopyFileEx. Unfortunately CopyFileEx seems to have this behaviour to copy the case of the name too.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Main TC doesn't do that, it unpacks the files directly to the desired target. This isn't possible with tcmadmin because it cannot access all the packers and packer plugins. Therefore TC has to unpack the files somewhere where you have write rights, and then let tcmadmin copy the files where they belong.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yes, you're rignt.
But TC keeps file case while copying file from one place to another with overwriting in any copy mode, even using Explorer copy mode (copy and paste)...
Also TCMADMIN keeps file case when replacing a file. So it is strange that it acts differently when copying from normal folder and temp folder... If TCMADMIN has copy method that keeps original filename why it cannot be used for copying unpacked file from temporary folder too?
But TC keeps file case while copying file from one place to another with overwriting in any copy mode, even using Explorer copy mode (copy and paste)...
Also TCMADMIN keeps file case when replacing a file. So it is strange that it acts differently when copying from normal folder and temp folder... If TCMADMIN has copy method that keeps original filename why it cannot be used for copying unpacked file from temporary folder too?
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hi!
You wrote:
I tried both with a directory where the user had no write rights, and one where he also had no read rights - the result was the same. I tested it on Windows XP SP3.
Therefore I don't know what you are doing here. Can you give me step by step instructions to reproduce the problem?
You wrote:
I have tested that extensively, but here the overwritten file always keeps its original name, even when unpacking from zip via tcmadmin. Only the overwrite dialog is showing the wrong case, the resulting file keeps the case of the original file.But when I unpack files with overwriting using TCMADMIN, they get exact name of unpacked file (including characters case).
I tried both with a directory where the user had no write rights, and one where he also had no read rights - the result was the same. I tested it on Windows XP SP3.
Therefore I don't know what you are doing here. Can you give me step by step instructions to reproduce the problem?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Please use this small ZIP:
It contains two folders with file whoose name differs only by character case (files have different contents so you can see which file you have in target folder).
At first, try to unpack e.g. yy\text.txt file to a folder with full access and then unpack file zz\TeXt.txt over it - filename case is preserved.
Now try the same with read-only folder (users: read-only, admins: full) and choose 'As admin'. Overwrite file - filename case is not preserved.
BTW overwrite dialog always shows both names just as file being unpacked has.
Tested on W7.
I tried to test it on WXP SP3 under user account but strange bugs found - when I tried to unpack files to read-only folder, 'file exists' dialog just had not 'as admin' button! And when I tried to unpack file to c:\windows\temp folder (which has special access rights - you can test with yours) TC didn't ask for overwrite!
Code: Select all
MIME-Version: 1.0
Content-Type: application/octet-stream; name="test.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.zip"
UEsDBBQAAgAAAHVp0DwAAAAAAAAAAAAAAAADAAAAeXkvUEsDBBQAAgAIAH1p0DzYGf2WBAAAAAIA
AAALAAAAeXkvdGV4dC50eHSrrAQAUEsDBBQAAgAAAGxp0DwAAAAAAAAAAAAAAAADAAAAenovUEsD
BBQAAgAIAIJp0DyhG9kkBAAAAAIAAAALAAAAenovVGVYdC50eHSrqgIAUEsBAhQAFAACAAAAdWnQ
PAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAwAAAAAAAAAHl5L1BLAQIUABQAAgAIAH1p0DzYGf2WBAAA
AAIAAAALAAAAAAAAAAAAIAAAACEAAAB5eS90ZXh0LnR4dFBLAQIUABQAAgAAAGxp0DwAAAAAAAAA
AAAAAAADAAAAAAAAAAAAMAAAAE4AAAB6ei9QSwECFAAUAAIACACCadA8oRvZJAQAAAACAAAACwAA
AAAAAAAAACAAAABvAAAAenovVGVYdC50eHRQSwUGAAAAAAQABADUAAAAnAAAAAAA
At first, try to unpack e.g. yy\text.txt file to a folder with full access and then unpack file zz\TeXt.txt over it - filename case is preserved.
Now try the same with read-only folder (users: read-only, admins: full) and choose 'As admin'. Overwrite file - filename case is not preserved.
BTW overwrite dialog always shows both names just as file being unpacked has.
Tested on W7.
I tried to test it on WXP SP3 under user account but strange bugs found - when I tried to unpack files to read-only folder, 'file exists' dialog just had not 'as admin' button! And when I tried to unpack file to c:\windows\temp folder (which has special access rights - you can test with yours) TC didn't ask for overwrite!
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I just tried it with XP SP3 too, but I did get the overwrite dialog and admin dialog, and tcmadmin preserved the target name just fine... 
Will have to test it on Windows 7 too.
Edit: I have tested it on Vista now, and I can confirm that it behaves differently from XP. Unfortunately it's too late for TC 7.55 final now. I will try to check it after the release since it isn't a severe problem.

Will have to test it on Windows 7 too.
Edit: I have tested it on Vista now, and I can confirm that it behaves differently from XP. Unfortunately it's too late for TC 7.55 final now. I will try to check it after the release since it isn't a severe problem.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50512
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, I did the testing with an admin account where I set "deny read" and "deny write" rights to specific folders.Do you testing under limited user acount?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com