refactor: rename Path:isUnresolved to Path:isBroken.

This commit is contained in:
rzvxa 2024-05-13 15:33:47 +03:30
parent 9eeacfd04b
commit 62884a4005

View File

@ -64,7 +64,7 @@ function! s:Path.cacheDisplayString() abort
if self.isSymLink if self.isSymLink
let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' -> ' let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' -> '
let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . self.symLinkDest let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . self.symLinkDest
if self.isUnresolved if self.isBroken
let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . g:NERDTreeGlyphBroken let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . g:NERDTreeGlyphBroken
endif endif
endif endif
@ -622,22 +622,22 @@ function! s:Path.readInfoFromDisk(fullpath)
if isdirectory(a:fullpath) if isdirectory(a:fullpath)
let self.isDirectory = 1 let self.isDirectory = 1
let self.isReadOnly = 0 let self.isReadOnly = 0
let self.isUnresolved = 0 let self.isBroken = 0
elseif filereadable(a:fullpath) elseif filereadable(a:fullpath)
let self.isDirectory = 0 let self.isDirectory = 0
let self.isReadOnly = filewritable(a:fullpath) ==# 0 let self.isReadOnly = filewritable(a:fullpath) ==# 0
let self.isUnresolved = 0 let self.isBroken = 0
elseif ftype ==# 'link' elseif ftype ==# 'link'
let self.isDirectory = 0 let self.isDirectory = 0
let self.isReadOnly = 0 let self.isReadOnly = 0
let self.isUnresolved = 1 let self.isBroken = 1
else else
call nerdtree#echoWarning('invalid ' . a:fullpath . 'file type: ' . ftype) call nerdtree#echoWarning('invalid ' . a:fullpath . 'file type: ' . ftype)
throw 'NERDTree.InvalidArgumentsError: Invalid path = ' . a:fullpath throw 'NERDTree.InvalidArgumentsError: Invalid path = ' . a:fullpath
endif endif
let self.isExecutable = 0 let self.isExecutable = 0
if !self.isDirectory && !self.isUnresolved if !self.isDirectory && !self.isBroken
let self.isExecutable = getfperm(a:fullpath) =~# 'x' let self.isExecutable = getfperm(a:fullpath) =~# 'x'
endif endif