locked parent directory after show file with japanese chars

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
RM8MR
Junior Member
Junior Member
Posts: 16
Joined: 2018-10-15, 17:07 UTC

locked parent directory after show file with japanese chars

Post by *RM8MR »

If I open file with japanese chars in name, parent directory is locked and cannot be renamed.

I create two directories (F7): "Dir1/Dir2".
I create empty file "ここに.txt" in "Dir2" (SHIFT+F4).
I show the empty file (F3) and press ESC to close.
Now, If I want to rename "Dir1" it will show error dialog (Please remove the write protection).
NOTE: "Dir2" is not locked and it can be renamed.


This problem is in TC10, TC11b9
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: locked parent directory after show file with japanese chars

Post by *ghisler(Author) »

Not confirmed. My guess is that a Lister plugin tries and fails to open the file.
Does the same problem happen when you press Alt+Shift+F3 to view the file, and then ESC to close?
This will open Lister without any plugins.

If it doesn't happen with Alt+Shift+F3, you can try switching manually to various plugins until the dir is locked.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: locked parent directory after show file with japanese chars

Post by *white »

Confirmed and confirmed for older versions as well (oldest tested: TC 7.50a).
Renaming in Explorer fails too.
Closing TC solves the problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: locked parent directory after show file with japanese chars

Post by *ghisler(Author) »

2white
Did you read my reply? Could you try with Alt+Shift+F3?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: locked parent directory after show file with japanese chars

Post by *white »

Yes, tried it. Same result. I tested without plugins anyway.
Did you try to rename the correct folder, Dir1?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: locked parent directory after show file with japanese chars

Post by *ghisler(Author) »

Doesn't happen here. Could you install lock hunter to find out whether the file itself is locked, or one of the directories?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: locked parent directory after show file with japanese chars

Post by *white »

On my hard drive C: it works OK. On my hard drive D: it doesn't work OK.
RM8MR
Junior Member
Junior Member
Posts: 16
Joined: 2018-10-15, 17:07 UTC

Re: locked parent directory after show file with japanese chars

Post by *RM8MR »

I can confirm what white says.

- Alt+Shift+F3 - do not work
- on C drive it works

Lock Hunter:
Dir1: Locking Processes : TOTALCMD64.EXE
Dir2: No process locking this file or folder have been found
ここに.txt: No process locking this file or folder have been found

Image: https://ibb.co/gT4tTCQ
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: locked parent directory after show file with japanese chars

Post by *ghisler(Author) »

I can confirm that it happens on drive D: but not on drive C:, very strange.
Author of Total Commander
https://www.ghisler.com
RM8MR
Junior Member
Junior Member
Posts: 16
Joined: 2018-10-15, 17:07 UTC

Re: locked parent directory after show file with japanese chars

Post by *RM8MR »

I think the problem is that folder names are not in japanese.
If I do not create "Dir1/Dir2", but I create folders "きけ/なに", I can show file "ここに.txt" and then I can rename first folder "きけ".
Now it works.
Last edited by RM8MR on 2023-07-03, 10:52 UTC, edited 1 time in total.
RM8MR
Junior Member
Junior Member
Posts: 16
Joined: 2018-10-15, 17:07 UTC

Re: locked parent directory after show file with japanese chars

Post by *RM8MR »

Sorry. It do not work if I use japanese chars in folder name.

If I use japanese chars in folder, it still lock second folder without japanese chars.
In this path is locked "DirA":
d:\ TMP \ DirA \ DirB \ きけ \ なに \ ここに.txt
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: locked parent directory after show file with japanese chars

Post by *white »

2RM8MR
Confirmed. Probably this is the case for any unicode character. I tried it with: d:\TEST\DirA\DirB\😀\😀.txt
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: locked parent directory after show file with japanese chars

Post by *ghisler(Author) »

I found the reason: It happens when a drive doesn't provide the alternate DOS file names in 8.3 format (8 name, 3 extension) for Unicode file names from a different code page. Lister tries to get them for plugins which don't support Unicode. The directory handle isn't closed in case of error (no name found).
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: locked parent directory after show file with japanese chars

Post by *white »

HISTORY.TXT wrote:03.07.23 Fixed: Lister: Viewing a file where the name contained Unicode characters from a different code page would keep the directory locked if the drive didn't support alternative 8.3 DOS names (32/64)
Tested OK using TC 11.00b10 32-bit and 64-bit.
Post Reply