Page 2 of 2

Re: [9.21a] Cd doesn't normalize paths

Posted: 2023-12-15, 07:15 UTC
by MVV
JOUBE,
You simply don't know how many checks TC does for different incorrectly configured environments...
But in this case simple normalization function call could fix many unobvious troubles. Unobvious because it is completely unclear that TC can't view file in nested archive because of an extra backslash in TEMP variable, and because such path is completely valid in Windows.

Re: [9.21a] Cd doesn't normalize paths

Posted: 2023-12-17, 11:44 UTC
by ghisler(Author)
TC already removes duplicate backslashes when an environment variable contains one at the end and the user also specifies it. But it doesn't try to fix duplicate backslashes in the middle of such variables.

Re: [9.21a] Cd doesn't normalize paths

Posted: 2023-12-26, 06:42 UTC
by MVV
Isn't it easy to normalize resulting path before using it in a panel or whatever else? Does TC normalize path to temporary directory while resolving path to its _tc dir? Looks like no, and I don't understand why, it is so easy...

Re: [9.21a] Cd doesn't normalize paths

Posted: 2023-12-26, 08:49 UTC
by JOUBE
MVV wrote: 2023-12-26, 06:42 UTC Isn't it easy to normalize resulting path before using it in a panel or whatever else? Does TC normalize path to temporary directory while resolving path to its _tc dir? Looks like no, and I don't understand why, it is so easy...
Of course that would be easy, but the Tc is a tool that should respect the user's input and not manipulate it. (A comparable example: w.google.com gives an error message from google even though it would be easy for google to redirect to www.google.com)

Re: [9.21a] Cd doesn't normalize paths

Posted: 2024-01-10, 08:21 UTC
by MVV
TC is a file manager and should operate with file system paths, and if a path may be represented in a different ways, all of them should be supported by a file manager. If a path with doubled backslash in the middle is valid for filesystem, it should be valid for a file manager too.
Path normalization is not a manipulation, it just switches between different representations of the same path (e.g. C:\Dir1\file.txt and C:/Dir1\\Dir2\..\.\file.txt represent the same path while in your example w.google.com and www.google.com are different paths), and it is necessary here because some TC code evidently doesn't support all representations of paths.

Re: [9.21a] Cd doesn't normalize paths

Posted: 2024-01-10, 16:57 UTC
by JOUBE
MVV wrote: 2024-01-10, 08:21 UTC (e.g. C:\Dir1\file.txt and C:/Dir1\\Dir2\..\.\file.txt represent the same path
;-) ... \\ cheated in between... And "same path"? No, if microsoft manipulates the path it is disrespectful to the user.