aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
Diffstat (limited to 'c_ldirs.go')
-rw-r--r--c_ldirs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index 7188d5b..f8867dc 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -68,13 +68,13 @@ type DirsList struct {
// adds a directory node to the list
func (ldirs *DirsList) add_back(node *DirsNode) {
- node.ID = global_id
if ldirs.head == nil {
ldirs.head = node
ldirs.last = ldirs.head
return
}
last := ldirs.last
+ node.ID = last.ID + 1
last.next = node
ldirs.last = last.next
}