Skip to content

Commit 9c3f977

Browse files
authored
Merge pull request #406 from tjoekbezoer/main
Root directory not respected as suppressed_dir
2 parents 82630e2 + 35c95a6 commit 9c3f977

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/auto-session/lib.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function Lib.find_matching_directory(dirToFind, dirs)
520520
---@diagnostic disable-next-line: param-type-mismatch
521521
for path in string.gmatch(dir, "[^\r\n]+") do
522522
local simplified_path = vim.fn.simplify(path)
523-
local path_without_trailing_slashes = string.gsub(simplified_path, "/+$", "")
523+
local path_without_trailing_slashes = string.gsub(simplified_path, "([/~].*)/+$", "%1")
524524

525525
-- Lib.logger.debug("find_matching_directory simplified: " .. simplified_path)
526526

0 commit comments

Comments
 (0)