Skip to content

Commit 559940a

Browse files
authored
fix for wrong path separators on Windows (#76)
* fix for wrong path separators on Windows * use vim.fs.abspath instead
1 parent fa1a37f commit 559940a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/nvim-possession/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ M.is_in_cwd = function(session, user_config)
6969
if type == "file" and file == session then
7070
for line in io.lines(user_config.sessions.sessions_path .. file) do
7171
if string.find(line, dir_pat) then
72-
session_dir = vim.uv.fs_realpath(vim.fs.normalize((line:gsub("cd%s*", ""))))
73-
if session_dir == vim.fn.getcwd() then
72+
session_dir = vim.fs.abspath((line:gsub("cd%s*", "")))
73+
if session_dir == vim.fs.normalize(vim.fn.getcwd()) then
7474
return true
7575
end
7676
end

0 commit comments

Comments
 (0)