Closed wroyca closed 2 months ago
Thanks for the issue!
Yes, I can reproduce this in various ways. I'll take a look.
This should now work on main
branch.
As suspected, it was due to path normalization which replaced all "\" with "/" on all platforms (because using "\" in paths even on Unix is bad). I opted for a more precise normalization depending on platform.
Thanks again for noticing this!
Contributing guidelines
Module(s)
files
Description
In mini.files,
\
represents the current directory. Accidentally deleting it can result in losing the entire current directory. On several occasions,\
has mistakenly found its way into my project directories during quick operations, leading me to inadvertently attempt its deletion without paying attention, only to end up deleting everything.For the most part, attempting to create
\
from mini.files will not work, but some operation with mini.files will let it slip by from time to time, though I don't know which, as it happen very sporadically. Still, the proper behavior here would be to allow\
and treat it as a proper directory/file like everything else.Neovim version
NVIM v0.10.0-dev+3111-g6ec6fafd6
Steps to reproduce
nvim -nu scripts/minimal_init.lua
!mkdir \
lua require("mini.files").open()
Try to delete \
Sync
Expected behavior
\
is recognized as valid filename and/or directory.Actual behavior
\
is incorrectly recognized as the current directory.