mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: when compiling a single .v file, check that it is not a folder
This commit is contained in:
parent
9ef8499183
commit
cc847f83a8
@ -782,7 +782,8 @@ pub fn (v &V) get_user_files() []string {
|
||||
user_files << single_test_v_file
|
||||
dir = os.base_dir(single_test_v_file)
|
||||
}
|
||||
if dir.ends_with('.v') || dir.ends_with('.vsh') {
|
||||
is_real_file := os.exists(dir) && !os.is_dir(dir)
|
||||
if is_real_file && ( dir.ends_with('.v') || dir.ends_with('.vsh') ) {
|
||||
single_v_file := dir
|
||||
// Just compile one file and get parent dir
|
||||
user_files << single_v_file
|
||||
|
Loading…
Reference in New Issue
Block a user