Closed
Description
Self-Diagnosis
- I have searched the issues for an answer to my question.
- I have reviewed the NERDTree documentation.
:h NERDTree
- I have reviewed the Wiki.
- I have searched the web for an answer to my question.
Steps to Reproduce the Issue
- Edit a directory using lower case drive name (e.g.
tab edit c:\dir
) - Try to open a file or directory two level below the initial directory
Current Result (Include screenshots where appropriate.)
Some file and/or directory cannot be opened depending on whether the node path is stored with lower case drive name or upper case drive name.
Expected Result
File and or directory can be opened.
The Cause
- The initial glob of path names uses the directory name as entered by the user (
c:\dir
), this results in path names starting with lower case drive name (or whatever case the user entered since path names are case insensitive on Windows) - The glob for file names under the subdirectories of the initial directory is done using relative path to
cwd
(which have been set toc:\dir
, butgetcwd()
return its properly cased nameC:\dir
), thus when joined it results in different caseC:\dir\file
- This causes mismatch between the stored path names inside the tree nodes.
This is one example if I put call confirm('skipped '.a:path.str().' | '.self.path.str())
in tree_dir_node.vim#L125.
Although a:path
should be under self.path
, it is skipped because the drive name cases are different. NERDTree was opened by running tabed e:\projects\pip
.