No warning when trying to create existing directory
Steps to reproduce - proper behavior:
1) Ensure that directory TEST doesn't exist.
2) Press F7 and create directory: TEST
3) Press F7 again and try to create directory: TEST
4) Error message appears: "Error: Directory [TEST] already exists! Please specify a different name."
Steps to reproduce - improper behavior:
1) Ensure that directory C:\TEST doesn't exist.
2) Press F7 and create directory: C:\TEST
3) Press F7 again and try to create directory: C:\TEST
4) No error message.
Regards
-No warning when trying to create existing directory
Moderators: Hacker, petermad, Stefan2, white
As i guess there is no bug here. It's esentially the same as where you create e.g.
1) TEST
2) TEST\TEST2 -> no error message although TEST already exists
3) TEST\TEST2 again -> still no error massage, now both TEST & TEST2 directories exists.
You create entire PATH (nested directories), no single DIRECTORY!
Explanation: this is probably by design, to avoid unwanted error message while creation path contains slashes/backslahes (and all other signs are valid).
1) TEST
2) TEST\TEST2 -> no error message although TEST already exists
3) TEST\TEST2 again -> still no error massage, now both TEST & TEST2 directories exists.
You create entire PATH (nested directories), no single DIRECTORY!
Explanation: this is probably by design, to avoid unwanted error message while creation path contains slashes/backslahes (and all other signs are valid).
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
@Gral, No. The important aspect is "user intention".
In your example, at point #3 my intention is to create directory "TEST2" within "TEST".
If this fails (which it does, because it exists already, see your point #2), TC should produce an error message.
Note, that my intention is not to create "TEST". I just assume it exists already. If my assumption is wrong, TC will just create that directory for me. However, if my assumption was wrong and "TEST" is the name of an existing file, or access permissions are against me, etc..., TC has to throw an error message (which it does).
You might argue that by specifying "TEST1\TEST2\TEST3", your intention is to have these 3 (nested) directories to be created. But this argument ignores that you deal with a path. A path always refers to a single file or directory (unless you use wildcards, which does not apply for this feature, i guess) -- by providing that path, you express the intention to actually create "TEST3" (within the other directories). If "TEST3" cannot be created because it already exists, well,...
In your example, at point #3 my intention is to create directory "TEST2" within "TEST".
If this fails (which it does, because it exists already, see your point #2), TC should produce an error message.
Note, that my intention is not to create "TEST". I just assume it exists already. If my assumption is wrong, TC will just create that directory for me. However, if my assumption was wrong and "TEST" is the name of an existing file, or access permissions are against me, etc..., TC has to throw an error message (which it does).
You might argue that by specifying "TEST1\TEST2\TEST3", your intention is to have these 3 (nested) directories to be created. But this argument ignores that you deal with a path. A path always refers to a single file or directory (unless you use wildcards, which does not apply for this feature, i guess) -- by providing that path, you express the intention to actually create "TEST3" (within the other directories). If "TEST3" cannot be created because it already exists, well,...
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It's as user Gral describes it: When there is a backslash in the name, TC creates entire path (multiple subdirs). It does not warn when parts of that path already exist. However, it shows an error when there is a file with that name. Example:
1.
- File C:\TEST\test.txt exists.
- User is in C:\ and presses F7, then enters TEST\test.txt -> error
2.
- Directory C:\TEST\TEST2 exists.
- User is in C:\ and presses F7, then enters TEST\TEST2 -> no error
1.
- File C:\TEST\test.txt exists.
- User is in C:\ and presses F7, then enters TEST\test.txt -> error
2.
- Directory C:\TEST\TEST2 exists.
- User is in C:\ and presses F7, then enters TEST\TEST2 -> no error
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com