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:
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
Block a user