vim-maktaba
vim-maktaba copied to clipboard
maktaba#path#GetDirectory behavior needs more thought
maktaba#path#GetDirectory treats nonexistent paths as directories:
echo maktaba#path#GetDirectory('foo/bar/NONEXISTENT')
" --> foo/bar/NONEXISTENT/
Originally we had a variant that assumed files, not directories, but that was deleted. I would argue that assuming files in ambiguous cases is the more intuitive behavior, and we should detect trailing slashes so there's a mechanism to get the alternative behavior in cases where the caller already believes the nonexistent path should refer to a directory.