Incorrect file length count in "long name" warning

Please report only one bug per message!

Moderators: white, sheep, Hacker, Stefan2

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2018-05-24, 15:17 UTC

UPDATE: still not fully fixed - try to set file name with 256 colons (:::::::::::::::: ...).

You still get the "please remove write protection" message.

Regards

User avatar
Dalai
Power Member
Power Member
Posts: 6250
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai » 2018-05-24, 15:48 UTC

Well, it seems that invalid characters are checked before the file name length. Makes sense to me. However, the error message needs improvement; it's always been this meaningless - but that's really OT now.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2018-05-24, 16:27 UTC

History.txt wrote:21.05.18 Fixed: When copying/moving/renaming a file, show "Invalid name" error when Windows reports an invalid name or path (error 123 or 161) (32/64)
I just wanted to say that - when you call MoveFile API to set file name to :::::::: - you get error code 123, but the error message is still "please remove write protection" (as it was before) - NOT "Invalid name", as it was intended (and described History.txt). So there must be still some problem with the current implementation.

Regards

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2018-06-14, 12:21 UTC

I made a quick research. When entering a proper new name for the file, the MoveFileEx API is called to do its work.

But when entering ::::::: as a file name, MoveFileEx call is not reached - so it has no chance to return error code 123 (which would display the "Invalid name" error).

Instead, some earlier TC code rejects ::::::: as a file name, displaying the "please remove write protection" error (instead of the expected "Invalid name" error).

Regards

Post Reply