Skip to content
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

Can't have '#' in the path to project directory #625

Closed
chrmarti opened this issue Apr 10, 2017 · 4 comments
Closed

Can't have '#' in the path to project directory #625

chrmarti opened this issue Apr 10, 2017 · 4 comments

Comments

@chrmarti
Copy link

From @IcedLance on April 9, 2017 9:1

  • VSCode Version: 1.11.1
  • OS Version: Win7

Steps to Reproduce:

  1. create a folder with '#' in the name as first symbol
  2. open a new folder in vscode somewhere inside that folder
  3. watch it helplessly try creating any of those "/.vscode/*.json" settings files and failing without throwing any error or warning

Everything else works as far as I could tell, but not config files.

Copied from original issue: microsoft/vscode#24358

@chrmarti
Copy link
Author

Could not reproduce on Windows 10. Is there anything in the devtools' console? (Help > Toggle Developer Tools)

@chrmarti
Copy link
Author

From @IcedLance on April 10, 2017 20:3

My bad, must be cpptools error.

Here's console log just in case:
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: e for terminal.run
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: e for terminal.stop
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: e for terminal.open
The system cannot find the file specified.
cannot open untitled:c%3A%5CUsers%5CQwerty%5C#SomeFolder%5COther%20folder%5C.vscode%5Cc_cpp_properties.json. Detail: file already exists on disk
[Extension Host] WARNING: Promise with no error callback:4
[Extension Host] Objecterror: "cannot open untitled:c%3A%5CUsers%5CQwerty%5C#SomeFolder%5COther%20folder%5C.vscode%5Cc_cpp_properties.json. Detail: file already exists on disk"exception: nullid: 4promise: Object__proto__: Object
[Extension Host] WARNING: Promise with no error callback:6
cannot open untitled:c%3A%5CUsers%5CQwerty%5C#SomeFolder%5COther%20folder%5C.vscode%5Cc_cpp_properties.json. Detail: file already exists on disk
[Extension Host] Object

@sean-mcmanus
Copy link
Contributor

@IcedLance Okay, we have a fix. Until the fix is released, a workaround is to fix the file .vscode\extensions\ms-vscode.cpptools-0.10.5\out\src\LanguageServer\C_Cpp_ConfigurationProperties.js yourself by changing lines 273, 274, and 280 to

let dirPathEscaped = dirPath.replace("#", "%23");
let fullPathToFile = path.join(dirPathEscaped, "c_cpp_properties.json");
filePath = vscode.Uri.file(path.join(dirPath, "c_cpp_properties.json"));

@bobbrow
Copy link
Member

bobbrow commented Apr 25, 2017

This issue should be fixed with v0.11.0. Please let us know if it is not.

@bobbrow bobbrow closed this as completed Apr 25, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants