-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS/Linux: Allow \
in file names
#212740
Comments
Related, but for folders instead: #207775 |
Note that the only chars not allowed in filenames and paths in Linux are |
C:\Program Files\Git\git-bash.exe
\
in file names
This is because of: vscode/src/vs/base/common/extpath.ts Line 167 in 942d81c
The discussion in #22899 indicates that this is unfortunately not straight forward to support, but keeping as feature request. |
Hm, I cannot reproduce the original issue so maybe meanwhile we could do this 🤔 |
PR up #212810 I hope this does not break something, but I am quite confident it should be fine because we do allow to create file names with backslash on Linux and Windows (due to a bug actually where we did not properly validate the file name) using the VS Code explorer 🤞 //cc @alexr00 where the validation method is used for simple file dialog which likely fixes #207775 |
Other issues solved by completing this issue: |
This bug has been fixed in the latest release of VS Code Insiders! @ElectricRCAircraftGuy, you can help us out by commenting If things still don't seem right, please ensure you're on version a48f464 of Insiders (today's or later - you can use Happy Coding! |
Does this issue occur when all extensions are disabled?: Yes/No yes
VS Code Version:
Version: 1.89.1
Commit: dc96b83
Date: 2024-05-07T05:16:23.416Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-28-generic
OS Version:
Ubuntu 22.04
Steps to Reproduce:
Create a file in Linux named
C:\Program Files\Git\git-bash.exe
at path~/bin
:Now try to open it with VSCode to edit it:
It doesn't open the file! I see this instead (with all "Recent" filenames redacted from the image):
It doesn't open! I have to open it in another text editor, such as Sublime Text, instead:
Note: for anyone wondering why in the world we woud have a Linux file that looks like a Windows path, it's because I am in a development environment where our team is mixed Linux and Windows users, and there are tricks where I can make the same script run on both systems by putting this inside that file, for instance, to emulate on Linux loading Git Bash on Windows:
File
~/bin/"C:\Program Files\Git\git-bash.exe"
:See here: Stack Overflow: How to configure a
preBuildSteps.sh
Bash script that runs as part of the pre-build process in the MPLAB X IDE on both Windows and LinuxI just need VSCode to be able to edit such files, now. Meanwhile, Sublime Text works fine on these files.
The text was updated successfully, but these errors were encountered: