Skip to content

Commit

Permalink
Secure empty file path
Browse files Browse the repository at this point in the history
  • Loading branch information
wmwnuk committed Apr 15, 2023
1 parent bc27c7c commit 18285ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/skeleton.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
" autoload/skeleton.vim

function! skeleton#load(file_path)
if !filereadable(a:file_path) || (g:sigma_skeleton_fill == 1 && getfsize(a:file_path) < 1)
if a:file_path != '' && (!filereadable(a:file_path) || (g:sigma_skeleton_fill == 1 && getfsize(a:file_path) < 1))
let s:file_name = split(a:file_path, '/')[-1]
let s:file_dir = split(a:file_path, '/')[-2]
let s:file_ext = split(s:file_name, '\.')[-1]
Expand Down

0 comments on commit 18285ba

Please sign in to comment.