olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Directories with lua pattern matching characters are not properly detected

HumblePresent opened this issue · comments

When determining if a directory matches a directory in allowed_dirs or ignored_dirs the dirs_match() function uses directory names as lua patterns to match against the current working directory. This causes issues when a directory name contains a special lua pattern matching character, "(", ")", ".", "%", "+", "-", "*", "?", "[", "^", "$", because it will be interpreted as such and cause some directories to not be properly detected despite being exact matches of directories in allowed_dirs or ignored_dirs.