Page 2 of 2

Posted: 2018-05-24, 15:17 UTC
by MarcinW
UPDATE: still not fully fixed - try to set file name with 256 colons (:::::::::::::::: ...).

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

Regards

Posted: 2018-05-24, 15:48 UTC
by Dalai
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

Posted: 2018-05-24, 16:27 UTC
by MarcinW
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

Posted: 2018-06-14, 12:21 UTC
by MarcinW
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