You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use command line tool on a directory with a . in the final folder level, the input is incorrectly assumed to be a file. For instance, C:/A.Directory is assumed to be a file, even if it's a folder name.
The root cause is a result of using a regex to determine filenames at:
returnnew ValidationResult($"The directory path '{command.Input}' does not exist.");
}
to simply:
else if(!File.Exists(command.Input)&&!Directory.Exists(command.Input)){returnnew ValidationResult($"The file or directory path '{command.Input}' does not exist.");}
When attempting to use command line tool on a directory with a
.
in the final folder level, the input is incorrectly assumed to be a file. For instance,C:/A.Directory
is assumed to be a file, even if it's a folder name.The root cause is a result of using a regex to determine filenames at:
CSharpToTypeScript/src/CSharpToTypeScript.CLITool/Utilities/FileSystem.cs
Lines 18 to 19 in f36b19e
I'd propose ditching the use of that extension method and just checking both file/directory existence at the same time.
So change the existing:
CSharpToTypeScript/src/CSharpToTypeScript.CLITool/Validation/InputExists.cs
Lines 20 to 27 in f36b19e
to simply:
Might resolve #44?
The text was updated successfully, but these errors were encountered: