Skip to content

fix: colon appearing in filepath for windows OS dirsession#55

Merged
stevearc merged 1 commit intostevearc:masterfrom
heiku-jiqu:windows-os-dirsession
May 6, 2024
Merged

fix: colon appearing in filepath for windows OS dirsession#55
stevearc merged 1 commit intostevearc:masterfrom
heiku-jiqu:windows-os-dirsession

Conversation

@heiku-jiqu
Copy link
Copy Markdown
Contributor

In windows OS, saving dirsession with resession.save(vim.fn.getcwd(), { dir = "dirsession", notify = false }) doesn't work.

vim.fn.getcwd() includes the drive name in front, e.g. C:\path\to\cwd, which is not handled by get_session_file(), causing it to return faulty json file path like C:\nvim-data\dirsession\C:_path_to_cwd.json.

This fix does another gsub to replace : with _. If there's a better way to do it, let me know.

Thanks!

@github-actions github-actions bot requested a review from stevearc May 4, 2024 09:02
@stevearc
Copy link
Copy Markdown
Owner

stevearc commented May 6, 2024

The approach looks fine to me. Thanks for the PR!

@stevearc stevearc merged commit 7e7fcc7 into stevearc:master May 6, 2024
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.

2 participants