diff options
author | Joe <rbo@gmx.us> | 2023-12-15 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-15 20:20:20 +0100 |
commit | a5c130f8f7e675b3c8531485e43baf214379080c (patch) | |
tree | dfcfd40a642f2b8c9f300b544871e2645b2c4e05 /c_init.go | |
parent | good shit (diff) | |
download | hardflip-a5c130f8f7e675b3c8531485e43baf214379080c.tar.gz hardflip-a5c130f8f7e675b3c8531485e43baf214379080c.tar.bz2 hardflip-a5c130f8f7e675b3c8531485e43baf214379080c.tar.xz hardflip-a5c130f8f7e675b3c8531485e43baf214379080c.tar.zst hardflip-a5c130f8f7e675b3c8531485e43baf214379080c.zip |
gogo
Diffstat (limited to 'c_init.go')
-rw-r--r-- | c_init.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) } } |