check if session dir contains files pt2

This commit is contained in:
Marco Hinz 2013-05-02 22:25:47 +02:00
parent b4b0dbae22
commit 664ad7fa57

View file

@ -36,8 +36,7 @@ function! startify#delete_session(...) abort
if !isdirectory(g:startify_session_dir)
echo 'The session directory does not exist: '. g:startify_session_dir
return
endif
if strlen(startify#get_session_names_as_string('')) == 0
elseif empty(startify#get_session_names_as_string(''))
echo 'There are no sessions...'
return
endif
@ -92,6 +91,9 @@ function! startify#load_session(...) abort
if !isdirectory(g:startify_session_dir)
echo 'The session directory does not exist: '. g:startify_session_dir
return
elseif empty(startify#get_session_names_as_string(''))
echo 'There are no sessions...'
return
endif
let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
\ ? a:1