1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
Henrixounez 2019-06-23 11:09:23 +02:00 committed by Alex Medvednikov
parent 6bb8e75448
commit f1cd3580eb

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")')
}