main.v: checking directory before trying to fetch files in said directory

pull/436/head
Henrixounez 2019-06-23 11:09:23 +02:00 committed by Alex Medvednikov
parent 6bb8e75448
commit f1cd3580eb
1 changed files with 1 additions and 1 deletions

View File

@ -516,10 +516,10 @@ mut args := ''
fn (c &V) v_files_from_dir(dir string) []string {
mut res := []string
mut files := os.ls(dir)
if !os.file_exists(dir) {
panic('$dir doesn\'t exist')
}
mut files := os.ls(dir)
if c.is_verbose {
println('v_files_from_dir ("$dir")')
}