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

vdoc: fix output folder creation (#9699)

This commit is contained in:
Lukas Neubert 2021-04-12 14:59:40 +02:00 committed by GitHub
parent 6b8585daea
commit 9427c5f526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,11 +338,10 @@ fn (mut vd VDoc) generate_docs_from_file() {
println(outputs[first])
}
} else {
if !os.is_dir(out.path) {
out.path = os.real_path('.')
}
if !os.exists(out.path) {
os.mkdir(out.path) or { panic(err) }
os.mkdir_all(out.path) or { panic(err) }
} else if !os.is_dir(out.path) {
out.path = os.real_path('.')
}
if cfg.is_multi {
out.path = os.join_path(out.path, '_docs')