diff options
author | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
commit | d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e (patch) | |
tree | 3b18e17799f832ee0f072eae6f21df27b4e21e0d /src/c_init.go | |
parent | bench time (diff) | |
download | hardflip-d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e.tar.gz hardflip-d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e.tar.bz2 hardflip-d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e.tar.xz hardflip-d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e.tar.zst hardflip-d2c0fdf3e0166f7ba2b82df74a2b5d858c00178e.zip |
good loading errmsg
Diffstat (limited to 'src/c_init.go')
-rw-r--r-- | src/c_init.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/c_init.go b/src/c_init.go index 5d399e2..5c9f115 100644 --- a/src/c_init.go +++ b/src/c_init.go @@ -92,24 +92,23 @@ func c_recurse_data_dir(dir, root string, opts HardOpts, host_node, err := c_read_yaml_file(root + dir + filename, ui) if err != nil { *load_err = append(*load_err, err) - return - } else if host_node == nil { - return + } else if host_node != nil { + host_node.Filename = filename + host_node.Parent = &dir_node + dir_node.lhost.add_back(host_node) } - host_node.Filename = filename - host_node.Parent = &dir_node - dir_node.lhost.add_back(host_node) i_draw_load_ui(ui) } } } -func c_load_data_dir(dir string, opts HardOpts, ui *HardUI) (*DirsList, *[]error) { +func c_load_data_dir(dir string, opts HardOpts, + ui *HardUI) (*DirsList, []error) { ldirs := DirsList{} var load_err []error c_recurse_data_dir("", dir + "/", opts, &ldirs, "", nil, 1, ui, &load_err) - return &ldirs, &load_err + return &ldirs, load_err } // fills litems sorting with dirs last |