Commits

Takeshi NISHIDA committed 6e67ba7

minor fix

Comments (0)

Files changed (1)

 function l9#writeFile(...)
   let args = copy(a:000)
   let args[1] = expand(args[1])
+  let dir = fnamemodify(args[1], ':h')
   try
-    call mkdir(fnamemodify(args[1], ':h'), 'p')
+    if !isdirectory(dir)
+      call mkdir(dir, 'p')
+    endif
     return call('writefile', args)
   catch
   endtry