aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
commit370728a95ac41b53f43cd2b9bbd4f5762e9134df (patch)
tree59a171e971706719571e3049a980372daf4392ce /c_ldirs.go
parentdelettin (diff)
downloadhardflip-370728a95ac41b53f43cd2b9bbd4f5762e9134df.tar.gz
hardflip-370728a95ac41b53f43cd2b9bbd4f5762e9134df.tar.bz2
hardflip-370728a95ac41b53f43cd2b9bbd4f5762e9134df.tar.xz
hardflip-370728a95ac41b53f43cd2b9bbd4f5762e9134df.tar.zst
hardflip-370728a95ac41b53f43cd2b9bbd4f5762e9134df.zip
ok
Diffstat (limited to '')
-rw-r--r--c_ldirs.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index de081b6..d7a98a1 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -154,6 +154,14 @@ func (dir *DirsNode) count_hosts() int {
return dir.lhost.last.ID + 1
}
+func (ldirs *DirsList) prev(dir *DirsNode) *DirsNode {
+ for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
+ if ptr.next == dir {
+ return ptr
+ }
+ }
+ return nil
+}
// return the number of hosts and subfolders of the dir
// func (item *ItemsNode) count_elements(skip_folds bool,
// folds map[*DirsNode]*ItemsList) (*ItemsNode, int) {