main.v: checking directory before trying to fetch files in said directory
parent
6bb8e75448
commit
f1cd3580eb
|
@ -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")')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue