microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.27k stars 28.56k forks source link

Unable to Open Code Editor Window After Renaming File in Specific Sequence #202866

Closed veerbal1 closed 7 months ago

veerbal1 commented 7 months ago

Type: Bug

Steps to Reproduce:

  1. Create a directory named 'test'.
  2. Inside the 'test' directory, create a file with a capital letter, e.g., Test.ts. This will open the editor window.
  3. Close the editor window.
  4. Click on the file Test.ts to open the editor window again.
  5. Rename the file to lowercase, e.g., test.ts (ensure the editor is closed as it open editor when you click on file to rename).
  6. Here is the bug - Click on the file test.ts to open the editor window.

Actual Behavior:

An error message is displayed in a VS Code alert box, stating, "Unable to open test.ts. The editor could not be opened because the file was not found." The alert box provides a 'Cancel' and 'Create File' button.

Screenshot 2024-01-19 at 9 35 15 PM

Further Steps:

Clicking on 'Create File' results in another error: "Unable to create file 'test/test.ts' that already exists when overwrite flag is not set."

Screenshot 2024-01-19 at 9 35 43 PM

Expected Behaviour: The editor window should open, allowing users to view and edit the content of the file test.ts.

And it works ok after I restart VS Code.

Operating System: MacOS Monterey - Intel Chip Reproducibility: Always

VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:48:06.308Z) OS version: Darwin x64 21.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz (4 x 1800)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 3, 2| |Memory (System)|8.00GB (0.22GB free)| |Process Argv|--crash-reporter-id b4acaa76-960d-47df-8a67-73f2dee0e678| |Screen Reader|no| |VM|0%|
Extensions (9) Extension|Author (truncated)|Version ---|---|--- vscode-tailwindcss|bra|0.10.5 simple-react-snippets|bur|1.2.7 prettier-vscode|esb|10.1.0 vscode-graphql|Gra|0.8.25 vscode-graphql-syntax|Gra|1.2.3 live-server|ms-|0.4.13 NextNav|Nex|1.1.0 prisma|Pri|5.8.1 LiveServer|rit|5.7.9 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaac:30438847 vsclangdf:30486550 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30933248 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 accentitlementst:30887150 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 dsvsc019a:30933241 ```
VSCodeTriageBot commented 7 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.85.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

veerbal1 commented 7 months ago

I have updated my VS Code to the latest version, and unfortunately, the issue still persists.

Version: 1.85.2 Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:32.531Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin x64 21.6.0

lramos15 commented 7 months ago

I can't seem to repro this. Can you try the insiders version https://code.visualstudio.com/insiders/

veerbal1 commented 7 months ago

Ok, I'll check it in Insider

veerbal1 commented 7 months ago

Now I tested on the latest VS Code Insider and the same issue exists in it. Also added a screen recording

VS Code - version Screenshot 2024-01-24 at 1 03 21 PM

https://github.com/microsoft/vscode/assets/55359171/c46b02aa-d42c-42f3-942b-a5de0c7643f1

lramos15 commented 7 months ago

What am I missing?

https://github.com/microsoft/vscode/assets/4544166/e2120d75-59f5-41a4-a4b6-dfb35ad1b15e

veerbal1 commented 7 months ago

By default, a fresh macOS installation on an empty disk uses a case-insensitive file system. However, during the installation process, I opted for a case-sensitive file system to align with the Linux setups used by other team members. This configuration change might be the source of the issue we're encountering, although I cannot be certain.

This problem has been around for about 5 to 6 months, but now I thought I should raise it on GitHub issues, instead of restarting VS Code

lramos15 commented 7 months ago

Ah this is duplicate of https://github.com/microsoft/vscode/issues/94307

We don't currently support case sensitive macOS