+[8.50ß11] Invalid auto-complete for path with '..'

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

+[8.50ß11] Invalid auto-complete for path with '..'

Post by *Flint »

0. Make sure the auto-complete feature is turned on.
1. Press F5 for some file or files.
2. In the Copy dialog delete the file name or *.* and replace it with ..\ to copy to a parent directory, e.g. if there was C:\Temp\dir\*.* now should be C:\Temp\dir\..\
3. The auto-complete list is displayed incorrectly: not for C:\Temp\ as expected, but for the current directory's parent dir.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [8.50ß11] Invalid auto-complete for path with '..'

Post by *white »

Flint wrote:2. In the Copy dialog delete the file name or *.* and replace it with ..\ to copy to a parent directory, e.g. if there was C:\Temp\dir\*.* now should be C:\Temp\dir\..\
3. The auto-complete list is displayed incorrectly: not for C:\Temp\ as expected, but for the current directory's parent dir.
Confirmed. Also when you hit F5 three times and enter ".". It seems everything before ".." or "." is ignored for the autocomplete function.
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 will check it, but I fear that I can't do much about it because this is handled in a different location (via Windows callbacks) than the rest of the dialog.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I found a solution. ..\ was treated in a special way mainly for the command line, where users could enter something like
notepad ..\
and expect to get some suggestions for the parent dir.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

HISTORY.TXT wrote:04.12.13 Fixed: Auto-complete: \..\ within path not handled correctly (32/64)
Tested OK using TC 8.50b12 32bit.
white wrote:Confirmed. Also when you hit F5 three times and enter ".". It seems everything before ".." or "." is ignored for the autocomplete function.
Still not fixed for "."
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Not a bug, this is intentional. This is mainly meant for the command line to look for files in the current directory. Since there is no use to append just .\ to a path, I will not add special treatment for it.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

I confirm fix for ..\ in 8.50β12, both 32 and 64-bit.
ghisler(Author) wrote:Since there is no use to append just .\ to a path, I will not add special treatment for it.
The problem is, when such path is typed in (e.g. when user mistyped one dot) TC will suggest incorrect paths, and user might not notice that these specific subdirectories are not really present in the target path. So he/she will select the invalid subdirectories without even knowing they don't exist on the target side, and after copying the result will be unintentinal creating all those subdirs.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why do you expect that anyone would enter path\.\ in this field?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author)
1. Typed ..\ but did not press the key hard enough, and one dot did not appear. With small fonts it's not easy to notice a difference between a dot and two dots from one glance.

2. For example, when I entered ..\ for parent dir, then thought better of it and decided to remove it. I know that .\ inside a path means nothing, so I may wish to save 2 keypresses by removing only 1 dot — resultant path will effectively be the same, but (surprisingly for user) not the auto-complete.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:Why do you expect that anyone would enter path\.\ in this field?
Anyone expects a valid path to be treated normally. No matter whether or not it is a useful path. The abnormal behavior will confuse the user and anyone will think this is a bug.

Same for "c:\path."and "c:\path.."
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, there are just too many combination. Not worth the loss of time.
Author of Total Commander
https://www.ghisler.com
Post Reply