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
{{ message }}
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.
Describe the bug
The function isValidFileName, located in src/Forge.ProjectSystem/Prelude.fs is buggy on Linux systems.
This function relies on concatenating the output of Path.GetInvalidPath Chars and Path.GetInvalidFileNameChars, then checking to see if the full pathname has any characters in the concatenation of those two lists.
However, a full pathname may have characters which are valid path characters but invalid file name characters. E.g. on Linux GetInvalidFileNameChars() returns '/', which is used in the full pathname.
This is affecting upstream the VSCode rename plugin when attempting to rename files. Github issue
To Reproduce
Steps to reproduce the behaviour:
On a Linux box, run this command (fill in the blanks with your filename)
$ dotnet run --project src/Forge rename file -n /home/[user]/[...]/new.fs -r /home/[user]/[...]/new1.fs -p /home/[user]/[...]/[projectName].fsproj
> Cannot Rename File - invalid name
Expected behaviour
File is renamed
Ideas to fix
Split pathname into file name and path name, and check independently therein. I will work on a PR for this, if this issue is confirmed to be a bug.
Environment (please complete the following information):
OS: Ubuntu 18.04
Ionide version: 4.0.6
VSCode version: 1.37.1
dotnet SDK version: 2.2.401
dotnet core version: 2.2.6
The text was updated successfully, but these errors were encountered:
Describe the bug
The function isValidFileName, located in src/Forge.ProjectSystem/Prelude.fs is buggy on Linux systems.
This function relies on concatenating the output of Path.GetInvalidPath Chars and Path.GetInvalidFileNameChars, then checking to see if the full pathname has any characters in the concatenation of those two lists.
However, a full pathname may have characters which are valid path characters but invalid file name characters. E.g. on Linux GetInvalidFileNameChars() returns '/', which is used in the full pathname.
This is affecting upstream the VSCode rename plugin when attempting to rename files.
Github issue
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
File is renamed
Ideas to fix
Split pathname into file name and path name, and check independently therein. I will work on a PR for this, if this issue is confirmed to be a bug.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: