From a5c130f8f7e675b3c8531485e43baf214379080c Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 15 Dec 2023 20:20:20 +0100 Subject: gogo --- c_init.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'c_init.go') diff --git a/c_init.go b/c_init.go index 7a1293a..53b060b 100644 --- a/c_init.go +++ b/c_init.go @@ -94,7 +94,10 @@ func c_recurse_data_dir(dir string, root string, lhost *HostList) { c_recurse_data_dir(dir + file.Name() + "/", root, lhost) } else if filepath.Ext(file.Name()) == ".yml" { host := c_read_yaml_file(root + dir + file.Name()) - host.Path = dir + file.Name()[0:len(file.Name()) - 4] + if len(host.Name) == 0 { + return + } + host.Path = dir + file.Name() lhost.add_back(host) } } -- cgit v1.2.3