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
File System Watcher has double slashes // as path separator #210517
bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberfile-watcherFile watcherverifiedVerification succeeded
I can reproduce the issue with the latest nightly insiders build as well. No idea yet what exactly triggers this though.
The didSave event contains the correct URI, whereas the didChangeWatchedFiles event contains a URI with the duplicated / at the position of the folder that I opened.
In the example above from Alex Boyko (@BoykoAlex) the folder that got opened in VSCode is /Users/aboyko/git/vscode-spring-boot-dashboard/test/projects/spring-petclinic, the src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java is the path inside the project. So it looks to me like the duplicated / shows up between the workspace folder and the path inside the workspace.
I wonder if some other extension installs a watcher that ends up with this double slash. Does it reproduce with all extensions disabled except for the one that creates the watcher?
Specifically, I would try with disabling the Java extension and friends.
You are right, once I have this extension active: vscjava.vscode-java-dependency, the events from the file watcher have the double slashes problem. Without that extension active, the events look fine.
I am pushing #210561 to have trailing path separators removed from file watch requests. In my testing when I have a watcher with a trailing slash, I am not ending up with double slashes anymore:
bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberfile-watcherFile watcherverifiedVerification succeeded
Activity
bpasero commentedon Apr 17, 2024
I cannot reproduce, you would have to tell me exactly how your setup looks like (folder path you run from, etc.).
Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/
martinlippert commentedon Apr 17, 2024
I can reproduce the issue with the latest nightly insiders build as well. No idea yet what exactly triggers this though.
The
didSaveevent contains the correct URI, whereas thedidChangeWatchedFilesevent contains a URI with the duplicated/at the position of the folder that I opened.In the example above from Alex Boyko (@BoykoAlex) the folder that got opened in VSCode is
/Users/aboyko/git/vscode-spring-boot-dashboard/test/projects/spring-petclinic, thesrc/main/java/org/springframework/samples/petclinic/owner/OwnerController.javais the path inside the project. So it looks to me like the duplicated/shows up between the workspace folder and the path inside the workspace.bpasero commentedon Apr 17, 2024
👋 Martin
I wonder if some other extension installs a watcher that ends up with this double slash. Does it reproduce with all extensions disabled except for the one that creates the watcher?
Specifically, I would try with disabling the Java extension and friends.
martinlippert commentedon Apr 17, 2024
👋 Ben! Long time, no see... :-)
You are right, once I have this extension active:
vscjava.vscode-java-dependency, the events from the file watcher have the double slashes problem. Without that extension active, the events look fine.bpasero commentedon Apr 17, 2024
Ok thanks for confirming, we document that
baseUricannot have trailing slashes:vscode/src/vscode-dts/vscode.d.ts
Lines 2221 to 2226 in a7d0bc8
I will go ahead and close this issue.
bpasero commentedon Apr 17, 2024
I am pushing #210561 to have trailing path separators removed from file watch requests. In my testing when I have a watcher with a trailing slash, I am not ending up with double slashes anymore: