Skip to content

Commit b10920c

Browse files
added dir check before listing session files
1 parent 0844f6d commit b10920c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/nvim-possession/utils.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ local M = {}
44
---@param file string
55
---@return table
66
M.session_files = function(file)
7+
if vim.fn.isdirectory(file) == 1 then
8+
return {}
9+
end
710
local lines = {}
811
local cwd, cwd_pat = "", "^cd%s*"
912
local buf_pat = "^badd%s*%+%d+%s*"

0 commit comments

Comments
 (0)