Skip to content

Fix loading projects on network drives #996

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

Merged
merged 3 commits into from
Jun 26, 2024
Merged

Conversation

thecrypticace
Copy link
Contributor

Opening a project on a networked drive (e.g. Z:\my-project) would fail because:

  • We ask node for the "real" file path which returns a UNC share path (e.g. \\MyShare\some-folder\my-project)
  • Improper path normalization
  • Errors in enhanced-resolve with UNC paths

Additionally, opening projects on a network share directly (rather than a mapped network drive) would always fail to discover any projects.

I've made some improvements to file path handling such that:

  • Loading a project on a network share directly does not outright fail — there are still some problems but they appear to be in enhanced-resolve when resolving relative file paths
  • Loading a project on a networked drive no longer uses the UNC path returned by fs.realpath and uses the url that was passed in. This means that symlinks don't get resolved however it should (hopefully) solve most issues when using Intellisense with projects over the network

Fixes #994

@thecrypticace thecrypticace merged commit 405502b into master Jun 26, 2024
@thecrypticace thecrypticace deleted the feat/win-network-drives branch June 26, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to find config file on network drive (v0.12 regression)
1 participant