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

fix(path): Windows parent root directory #504

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

jamestrew
Copy link
Contributor

@jamestrew jamestrew commented Jun 30, 2023

In Windows, doing Path:new("C:\\Users"):parents() results in a getting C: as one of its parents which is not a valid path. All valid paths in Windows, Linux, Mac must have at least one path separator.

Partially fixes nvim-telescope/telescope-file-browser.nvim#285

In Windows, doing `Path:new("C:\\Users"):parents()` resulted in a
getting `C:` as one of its parents which is not a valid path. All valid
paths in Windows, Linux, Mac must have at least one path separator.
@jamestrew jamestrew changed the title fix(path): Windows root directory fix(path): Windows parent root directory Sep 14, 2023
@jamestrew
Copy link
Contributor Author

@Conni2461 following up 🙏

@ollbx
Copy link

ollbx commented Sep 16, 2023

I reported a related issue in May. This will probably fix that, too.
#489

@epwalsh
Copy link

epwalsh commented Jan 26, 2024

It would be great if we could get this fix in. This issue breaks some critical functionality in Obsidian.nvim for Windows users.

@Conni2461
Copy link
Collaborator

i cant confirm that this actually fixes issues on windows, but it seems like it doesnt introduce regressions for linux, so lets give this a try.

Thanks for the fix james :)

@Conni2461 Conni2461 merged commit 4f71c0c into nvim-lua:master Jan 29, 2024
6 checks passed
@jamestrew jamestrew deleted the fix/path-windows-parents branch January 29, 2024 21:49
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.

Accessing the root directory of C:\ on Windows does not work as intended
4 participants