+Problem with Shift+F5 dialog

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

Moderators: Hacker, petermad, Stefan2, white

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

+Problem with Shift+F5 dialog

Post by *MarcinW »

It seems that in most cases TC trims spaces at the beginning and at the end of commands or file names entered by the user. This is in general right. But in the specific case of Shift+F5 dialog, it prevents the user from making a file copy with a name that begins with a space.

(I know, spaces at the beginning of file names are bad, cause many problems, and so on... but these files are displayed at the very beginning of the file list, when sorting by name, which is sometimes useful)

What's worse, the user may also unintentionally overwrite another file that he thinks he is overwriting: if there are files in the same directory:
- oldname.txt
- newname.txt
- " newname.txt" (with a space at the beginning)
the user may want to make a copy of oldname.txt as " newname.txt" - with intention of overwriting it. But TC will trim spaces at the beginning, so the user may overwrite newname.txt instead.

Please also note, that in this specific case there is no need to trim any spaces, because the user doesn't fill the edit field manually - TC does this for him, so there won't be any undesired spaces in the edit field for sure.

So TC should not trim any spaces in the Shift+F5 dialog. Due to a problem with unintentional overwriting of an improper file, I placed this note as a bug report, not a suggestion.

Regards
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I use "! newname.txt" for such task, and different number of spaces. :D
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have changed it in beta 14, please try it!
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Problem fixed in Beta 14.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply