diff options
author | Joe <rbo@gmx.us> | 2024-01-15 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-15 20:20:20 +0100 |
commit | 370728a95ac41b53f43cd2b9bbd4f5762e9134df (patch) | |
tree | 59a171e971706719571e3049a980372daf4392ce /c_ldirs.go | |
parent | delettin (diff) | |
download | hardflip-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.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) { |