.vim/autoload/vimrc.vim

changeset 940
fb5519032710
parent 939
b769704bb258
child 943
e0ff02862951
--- a/.vim/autoload/vimrc.vim
+++ b/.vim/autoload/vimrc.vim
@@ -105,9 +105,9 @@ END_PERL
   endfunc
 endif
 
-func! vimrc#PrepDir(path, prune_days) abort
-  if !filewritable(path)
-    call mkdir(path, 'p', 0700)
+func! vimrc#PrepDir(path) abort
+  if !filewritable(a:path)
+    call mkdir(a:path, 'p', 0700)
   endif
 endfunc
 
@@ -116,8 +116,8 @@ func! vimrc#PruneFiles(path, days) abort
   if isdirectory(l:path)
     for file in split(globpath(l:path, "*"), "\n")
       if localtime() > getftime(file) + 86400 * a:days
-        delete(file) != 0
+        call delete(file)
       endif
     endfor
-  else
+  endif
 endfunc

mercurial