Wrong contents of context menu if path contains double
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 18
- Joined: 2009-08-27, 14:51 UTC
Wrong contents of context menu if path contains double
Hi, here is minor bug, we've found it apparently.
1. Create folder like c:\dir1\dir2\dir3
2. in command line enter "cd c:\dir1\\dir2" (double backslash in the path)
After that pat field will contain "c:\dir1\\dir2", however it's more correct to change the path to "c:\dir1\dir2" i.e. normalize the path removing unnecessary repeating backslashes. BTW, if we try to use command like "cd c:\dir1\..\dir1\dir2", resulting path (correctly) is "c:\dir1\dir2" i.e. unnecessary part is deleted correctly.
3. Try to call context menu on dir3. Context menu must contain both total commander specific items and Explorer items. But, if path contains doublebackslash, context menu does not contain explorer items.
Regards,
Sergey.
1. Create folder like c:\dir1\dir2\dir3
2. in command line enter "cd c:\dir1\\dir2" (double backslash in the path)
After that pat field will contain "c:\dir1\\dir2", however it's more correct to change the path to "c:\dir1\dir2" i.e. normalize the path removing unnecessary repeating backslashes. BTW, if we try to use command like "cd c:\dir1\..\dir1\dir2", resulting path (correctly) is "c:\dir1\dir2" i.e. unnecessary part is deleted correctly.
3. Try to call context menu on dir3. Context menu must contain both total commander specific items and Explorer items. But, if path contains doublebackslash, context menu does not contain explorer items.
Regards,
Sergey.
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
c:\dir1\\dir2 is valid path for FindFirstFile, so TC doesn't modify it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 18
- Joined: 2009-08-27, 14:51 UTC
Sure it is valid. The path "c:\dir1\..\dir1\dir2" is valid also, and is modified when we try to cd there to "c:\dir1\dir2".
The problem is not that path is modified or not. The problem is that if the path contains double backslashes ("\\") then context menu inside this directory does not contain Explorer items.
Just try it.
The problem is not that path is modified or not. The problem is that if the path contains double backslashes ("\\") then context menu inside this directory does not contain Explorer items.
Just try it.
-
- Junior Member
- Posts: 18
- Joined: 2009-08-27, 14:51 UTC
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
-
- Junior Member
- Posts: 18
- Joined: 2009-08-27, 14:51 UTC
Explorer is not the etalon. Try use cmd.exe and use "cd c:\Program Files\\Internet Explorer" it should work.
Again, there is no problem if total gets \\ in the path. There is problem that when the path contains \\, we get wrong contents of context menu.
BTW, in total we get 2 different behaviors:
1. try edit path in corresponding edit box directly and put doubleslashes there - total will replace it with single slashes.
2 - try use cd from command line - doubleslashes are not replaced.
Regards,
Sergey.
Again, there is no problem if total gets \\ in the path. There is problem that when the path contains \\, we get wrong contents of context menu.
BTW, in total we get 2 different behaviors:
1. try edit path in corresponding edit box directly and put doubleslashes there - total will replace it with single slashes.
2 - try use cd from command line - doubleslashes are not replaced.
Regards,
Sergey.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
I believe there is a difference between double slashes being ignored by cmd.exe, choked on by explorer and the fact that totalcmd handles them differently depending on entirely on context... than they saying they are "valid".
H:\_H_\_APPS_\_FileManager\TC+sac>cd \\XP
'\\XP'
CMD does not support UNC paths as current directories.
H:\_H_\_APPS_\_FileManager\TC+sac>
Yet, according to MSDN 2.2.1.4 UNC Path,H:\_H_\_APPS_\_FileManager>cd TC+sac\\XP
H:\_H_\_APPS_\_FileManager\TC+sac\XP>
Which again, the \\ is leading.A UNC path can be used to access network resources, and MUST be a null-terminated Unicode character string whose format MUST be \\<hostname>\<sharename>[\<objectname>]*