From fcaee1fad0de4cd76cab8a808b8f62010b5bfabb Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 15 Jan 2024 20:20:20 +0100 Subject: working? --- c_litems.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'c_litems.go') diff --git a/c_litems.go b/c_litems.go index 031432d..48e9246 100644 --- a/c_litems.go +++ b/c_litems.go @@ -180,13 +180,14 @@ func (item *ItemsNode) get_next_level() *ItemsNode { item_ptr := item for item_ptr != nil { if item_ptr.is_dir() == false { + item_ptr = item_ptr.next continue } if item_ptr.Dirs == ptr { - break + return item_ptr } item_ptr = item_ptr.next } - return item_ptr + return nil } -- cgit v1.2.3