Skip to content

Commit

Permalink
:Rextract! creates directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Sep 10, 2010
1 parent 6d4ee87 commit 6ae1529
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/rails.vim
Expand Up @@ -3176,6 +3176,13 @@ function! s:Extract(bang,...) range abort
if filereadable(out) && !a:bang
return s:error('E13: File exists (add ! to override)')
endif
if !isdirectory(fnamemodify(out,':h'))
if a:bang
call mkdir(fnamemodify(out,':h'),'p')
else
return s:error('No such directory')
endif
endif
" No tabs, they'll just complicate things
if ext =~? '^\%(rhtml\|erb\|dryml\)$'
let erub1 = '\<\%\s*'
Expand Down

0 comments on commit 6ae1529

Please sign in to comment.