Skip to content

Commit

Permalink
fix: windows
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 7, 2024
1 parent f18d013 commit 2d83b1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/persistence/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ function M.select()
local file = session:sub(#Config.options.dir + 1, -5)
local dir, branch = unpack(vim.split(file, "%%", { plain = true }))
dir = dir:gsub("%%", "/")
if jit.os:find("Windows") then
dir = dir:gsub("^(%w)/", "%1:/")
end
if not have[dir] then
have[dir] = true
items[#items + 1] = { session = session, dir = dir, branch = branch }
Expand Down

0 comments on commit 2d83b1a

Please sign in to comment.