aboutsummaryrefslogtreecommitdiffstats
path: root/c_init.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-26 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-26 20:20:20 +0100
commit1db644bcf567cceee2ca3ba2bc746a8028cf2069 (patch)
treefdc2734232df77e17a55ce852b806c02b08b6611 /c_init.go
parentup (diff)
downloadhardflip-1db644bcf567cceee2ca3ba2bc746a8028cf2069.tar.gz
hardflip-1db644bcf567cceee2ca3ba2bc746a8028cf2069.tar.bz2
hardflip-1db644bcf567cceee2ca3ba2bc746a8028cf2069.tar.xz
hardflip-1db644bcf567cceee2ca3ba2bc746a8028cf2069.tar.zst
hardflip-1db644bcf567cceee2ca3ba2bc746a8028cf2069.zip
up
Diffstat (limited to 'c_init.go')
-rw-r--r--c_init.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/c_init.go b/c_init.go
index e58e05d..e7d4f08 100644
--- a/c_init.go
+++ b/c_init.go
@@ -76,15 +76,16 @@ func c_recurse_data_dir(dir, root string, ldirs *DirsList,
}
ldirs.add_back(&dir_node)
for _, file := range files {
+ filename := file.Name()
if file.IsDir() == true {
- c_recurse_data_dir(dir + file.Name() + "/", root, ldirs,
+ c_recurse_data_dir(dir + filename + "/", root, ldirs,
id + 1, file.Name(), &dir_node, depth + 1)
- } else if filepath.Ext(file.Name()) == ".yml" {
- host := c_read_yaml_file(root + dir + file.Name())
+ } else if filepath.Ext(filename) == ".yml" {
+ host := c_read_yaml_file(root + dir + filename)
if host == nil {
return
}
- host.Filename = file.Name()
+ host.Filename = filename
host.Dir = &dir_node
dir_node.lhost.add_back(host)
}