auto-session
auto-session copied to clipboard
[BUG] [WINDOWS] Special characters are not saved properly
Describe the bug
The path for the sessions is not shown properly, functionally they work, but visually they are wrong:
C:/path/to/project
is shown as C++%path%to%project
(: -> ++, and / -> %)
To Reproduce Steps to reproduce the behavior:
- Save any session on windows
- Open "autosession search"
Expected behavior A clear and concise description of what you expected to happen. To see the path correctly with the proper characters
Screenshots
If applicable, add screenshots to help explain your problem.
Baseline (please complete the following information):
- Windows 11 21H2
- Neovim version
v0.8.0-dev+519-g6f6286e4f
- https://gitlab.com/kishikaisei/nvim
Hey @kishikaisei thanks for the issue submission! 🎉 I'd be happy to accept a PR if you or anyone's got some free time to dive into this. I don't really have the means to look deeper into Windows issues with this plugin unfortunately.
within Windows operating systems there are different restrictions concerning usable characters for valid file and folder names. to name a few obvious ones:
- no case-sensitivity for file names on windows systems
- no colons
:
within a file name. only to separate the drive identifier from the rest of the path - no backslash
\
within the file names as they are used to separate folders - ...
thus, the replacement of :
with ++
and \
with %
at least renders the file names valid for session files. This is not very pretty (I would prefer a simple underscore _
for any of the invalid characters) but at least, windows doesn't get confused.
@kishikaisei : what would you like to see as a "solution", here?
If it was only about representing that session file name within the nvim editor when listing all available sessions, that should not be such a big problem for implementation,