vdoc: don't add _docs directory when an out path is specified (#21233)

This commit is contained in:
Turiiya 2024-04-09 05:50:50 +02:00 committed by GitHub
parent 23532d4dec
commit efc395eb64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,7 +371,7 @@ fn (mut vd VDoc) generate_docs_from_file() {
out.path = os.real_path('.') out.path = os.real_path('.')
} }
if cfg.is_multi { if cfg.is_multi {
out.path = os.join_path(out.path, '_docs') out.path = if out.path == '.' { '_docs' } else { out.path }
if !os.exists(out.path) { if !os.exists(out.path) {
os.mkdir(out.path) or { panic(err) } os.mkdir(out.path) or { panic(err) }
} else { } else {