mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Added comment to clarify which part of the path is the 'drive' for windows network shares
This commit is contained in:
@@ -2110,6 +2110,7 @@ endfunction
|
|||||||
function! s:Path.extractDriveLetter(fullpath)
|
function! s:Path.extractDriveLetter(fullpath)
|
||||||
if s:running_windows
|
if s:running_windows
|
||||||
if a:fullpath =~ '^\(\\\\\|\/\/\)'
|
if a:fullpath =~ '^\(\\\\\|\/\/\)'
|
||||||
|
"For network shares, the 'drive' consists of the first two parts of the path, i.e. \\boxname\share
|
||||||
let self.drive = substitute(a:fullpath, '^\(\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\).*', '\1', '')
|
let self.drive = substitute(a:fullpath, '^\(\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\).*', '\1', '')
|
||||||
let self.drive = substitute(self.drive, '/', '\', "g")
|
let self.drive = substitute(self.drive, '/', '\', "g")
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user