1
0
forked from aniani/vim

patch 8.2.0272: ":helptags ALL" gives error for some directories

Problem:    ":helptags ALL" gives error for directories without write
            permission. (Matěj Cepl)
Solution:   Ignore errors for ":helptags ALL". (Ken Takata, closes #5026,
            closes #5652)
This commit is contained in:
Bram Moolenaar
2020-02-17 22:39:35 +01:00
parent 82f654e092
commit 414b796627
3 changed files with 24 additions and 11 deletions

View File

@@ -90,10 +90,18 @@ func Test_helptag_cmd()
" The following tests fail on FreeBSD for some reason
if has('unix') && !has('bsd')
" Read-only tags file
call writefile([''], 'Xdir/tags')
call setfperm('Xdir/tags', 'r-xr--r--')
call assert_fails('helptags Xdir', 'E152:', getfperm('Xdir/tags'))
call delete('Xdir/tags')
call mkdir('Xdir/doc', 'p')
call writefile([''], 'Xdir/doc/tags')
call writefile([], 'Xdir/doc/sample.txt')
call setfperm('Xdir/doc/tags', 'r-xr--r--')
call assert_fails('helptags Xdir/doc', 'E152:', getfperm('Xdir/doc/tags'))
let rtp = &rtp
let &rtp = 'Xdir'
helptags ALL
let &rtp = rtp
call delete('Xdir/doc/tags')
" No permission to read the help file
call setfperm('Xdir/a/doc/sample.txt', '-w-------')