mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: prevent infinite recursion in get_parent_mod
This commit is contained in:
parent
69df472adc
commit
0a84f0feb5
@ -144,6 +144,7 @@ pub fn (nodes []DocNode) find_children_of(parent_type string) []DocNode {
|
||||
}
|
||||
|
||||
fn get_parent_mod(dir string) ?string {
|
||||
if dir.len == 0 { return error('root folder reached') }
|
||||
base_dir := os.base_dir(dir)
|
||||
if os.file_name(base_dir) in ['encoding', 'v'] && 'vlib' in base_dir {
|
||||
return os.file_name(base_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user