]> git.phdru.name Git - dotfiles.git/commitdiff
.vim/plugin/tmpwatch.vim: Do not remove file from the current directory
authorOleg Broytman <phd@phdru.name>
Sat, 9 Mar 2019 21:44:40 +0000 (00:44 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 9 Mar 2019 21:44:40 +0000 (00:44 +0300)
.vim/plugin/tmpwatch.vim

index 98a7062c60e3d4494693cb88add4c03059eef10d..cdd1be0ed5fcf09932a61daa7bf1c4fb03654414 100644 (file)
@@ -14,7 +14,7 @@ function Tmpwatch(path, days)
 endfunction
 
 " undofile part of your .vimrc
-if exists("+undofile")
+if exists("+undofile") && !empty(&undodir) && (&undodir != '.')
     " remove undo files which have not been modified for 31 days
     call Tmpwatch(&undodir, 31)
 endif