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 }}
Repository navigation
Issues with not case/fragment-normalizing file paths (macOS, Windows) #12448
In VS Code we deal with resource URIs across all layers. In most cases we use URI.toString() to decide if a resource is equal to another resource. This assumption is not very good when we talk about file system paths because on macOS and Windows a file path should be considered equal if the paths are identical, even if the casing differs (/some/path === /SOME/path). Only Linux has a case-sensitive file system where this rule does not apply.
changed the title [-]Issues when using wrong path casing when starting Code[/-][+]Issues with mixed casing of file paths entering the workbench[/+]on Jan 3, 2017
changed the title [-]Issues with mixed casing of file paths entering the workbench[/-][+]Issues with not case-normalizing file paths (macOS, Windows)[/+]on Jan 3, 2017
changed the title [-]Issues with not case-normalizing file paths (macOS, Windows)[/-][+]Issues with not case/fragment-normalizing file paths (macOS, Windows)[/+]on Feb 7, 2017
Any update on this? I keep tripping over it particularly when using the debugger.
Reacted by Steven Sojka, Vadim Rybak, Pieter Vantorre, Přemysl Karbula, Florian Castellane, Mark Murphy, Mike Pateras, Don Jayamanne, Tim Hutt, matthiasg and 1 more
Small update from our side: this milestone a few changes got pushed that should improve the situation specifically for files that use different casing on operating systems that have case-insensitive behaviour (Windows, macOS).
For example, opening a file /some/path/file.css and /some/path/FILE.css would result in just 1 editor opening. Internally we introduced the notion of "canonical" URIs, meaning that the first time a file is opened, we take the casing for granted and anytime a different case is opened, we use the first one.
We currently do NOT have plans to support other forms of file paths, such as:
symbolic links
Windows 8.3 filenames (e.g. textfi~1.txt)
Windows subst drive letters
That means, in these cases you would still see 2 editors opening with different models each, even though it is the same file on disk. But the majority of issues seems to originate from casing differences.
We are closing down for our May release with the changes included and monitor regressions which may require us to rethink the approach. But if everything goes well, this change should be available in stable early June.
This completed for June via #93368, closing. In our current 1.46.x stable release you should already see a single editor opening if the case of the file path differs on Windows and macOS.
Reacted by Don Jayamanne
Reacted by Joseph Kohlmann, Ryan Pierce, Don Jayamanne and Arttu Hanska
I created a file named wampBroker.ts, realized it should be renamed to WampBroker.ts, and renamed it through VS Code's file explorer on the left. The actual file was renamed to WampBroker.ts, it shows up in the explorer that way, but the tab is still showing wampBroker.ts. I tried shutting down Code and restarting, I even tried renaming it to blah.ts and then changing it to WampBroker.ts, but as long as it's named WampBroker.ts, it shows in the tab as wampBroker.ts. It's a minor annoyance at best, but the bug still seems to be there. Not sure what cache to clear to fix it.
Update: I figured out that (in Windows at least), if you wipe out the state.vscdb file under C:\Users\<user>\AppData\Roaming\Code\User\workspaceStorage\<find_the_right_directory> it resolves the issue the next time you open the workspace.
The easiest way to find <find_the_right_directory> was to open the workspace in question and then close VSCode, then sort the workspaceStorage directory by Date modified.
And I didn't "wipe them out", instead, I just renamed them to have the extension .old just in case anything was majorly broken.
I'm not saying I recommend this hack, but it did work for me. 🤷♂️
The issue that renaming files to same path but different case is not reflected in the editor should be fixed with our upcoming 1.47 release. As usual, I highly recommend to install our insiders version that get's updated nightly and never worry about issues anymore because they get fixed asap.
Activity
[-]Issues when using wrong path casing when starting Code[/-][+]Issues with mixed casing of file paths entering the workbench[/+][-]Issues with mixed casing of file paths entering the workbench[/-][+]Issues with not case-normalizing file paths (macOS, Windows)[/+]bpasero commentedon Feb 6, 2017
Pushed a fix for the broken file events on macOS.
[-]Issues with not case-normalizing file paths (macOS, Windows)[/-][+]Issues with not case/fragment-normalizing file paths (macOS, Windows)[/+]BillDenton commentedon Mar 2, 2017
Any update on this? I keep tripping over it particularly when using the debugger.
follow up 💄 on #12448
BillDenton commentedon Mar 16, 2017
Good to hear. I presume this will be available at the end of March. Is it available before that in the Insider Build?
bpasero commentedon Mar 16, 2017
BillDenton yes all in since today!
128 remaining items
tommitytom commentedon Apr 18, 2020
https://visualstudio.microsoft.com/vs/mac/
Gruntfuggly commentedon Apr 18, 2020
That's why I said "quite". VSCode uses Electron and the node ecosystem which covers Windows, OSX and Linux.
bpasero commentedon Jun 5, 2020
Small update from our side: this milestone a few changes got pushed that should improve the situation specifically for files that use different casing on operating systems that have case-insensitive behaviour (Windows, macOS).
For example, opening a file
/some/path/file.cssand/some/path/FILE.csswould result in just 1 editor opening. Internally we introduced the notion of "canonical" URIs, meaning that the first time a file is opened, we take the casing for granted and anytime a different case is opened, we use the first one.We currently do NOT have plans to support other forms of file paths, such as:
textfi~1.txt)substdrive lettersThat means, in these cases you would still see 2 editors opening with different models each, even though it is the same file on disk. But the majority of issues seems to originate from casing differences.
We are closing down for our May release with the changes included and monitor regressions which may require us to rethink the approach. But if everything goes well, this change should be available in stable early June.
You can already benefit from this change if you switch to our insiders build (https://code.visualstudio.com/insiders) and we welcome feedback.
bpasero commentedon Jun 12, 2020
This completed for June via #93368, closing. In our current 1.46.x stable release you should already see a single editor opening if the case of the file path differs on Windows and macOS.
damyanp commentedon Jun 12, 2020
Thank you! Great to see this addressed!
benlesh commentedon Jul 7, 2020
Benjamin Pasero (@bpasero) FYI: I'm in version 1.46.1 on Windows, I'm I'm seeing this issue.
I created a file named
wampBroker.ts, realized it should be renamed toWampBroker.ts, and renamed it through VS Code's file explorer on the left. The actual file was renamed toWampBroker.ts, it shows up in the explorer that way, but the tab is still showingwampBroker.ts. I tried shutting down Code and restarting, I even tried renaming it toblah.tsand then changing it toWampBroker.ts, but as long as it's namedWampBroker.ts, it shows in the tab aswampBroker.ts. It's a minor annoyance at best, but the bug still seems to be there. Not sure what cache to clear to fix it.benlesh commentedon Jul 7, 2020
Update: I figured out that (in Windows at least), if you wipe out the
state.vscdbfile underC:\Users\<user>\AppData\Roaming\Code\User\workspaceStorage\<find_the_right_directory>it resolves the issue the next time you open the workspace.The easiest way to find
<find_the_right_directory>was to open the workspace in question and then close VSCode, then sort theworkspaceStoragedirectory byDate modified.And I didn't "wipe them out", instead, I just renamed them to have the extension
.oldjust in case anything was majorly broken.I'm not saying I recommend this hack, but it did work for me. 🤷♂️
bpasero commentedon Jul 7, 2020
The issue that renaming files to same path but different case is not reflected in the editor should be fixed with our upcoming
1.47release. As usual, I highly recommend to install our insiders version that get's updated nightly and never worry about issues anymore because they get fixed asap.You can give our preview releases a try from: https://code.visualstudio.com/insiders/