summary refs log tree commit diff stats
path: root/compiler/lists.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-08-02 09:35:36 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-08-02 09:35:36 +0200
commitb66444800a276332d866ce9f0847e748a85aed43 (patch)
tree5016e44a4e61040e80ce801a37d7753a7dd13f86 /compiler/lists.nim
parentee61a39cff88c361e8d5be978c570d50c4d991a5 (diff)
parent23f64dd63d6c8f178f5fca1ec6e7706844808359 (diff)
downloadNim-b66444800a276332d866ce9f0847e748a85aed43.tar.gz
Merge pull request #1426 from Varriount/fix-813
Fix #813
Diffstat (limited to 'compiler/lists.nim')
-rw-r--r--compiler/lists.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/lists.nim b/compiler/lists.nim
index dd4f5d6be..efffe60fe 100644
--- a/compiler/lists.nim
+++ b/compiler/lists.nim
@@ -8,7 +8,8 @@
 #
 
 # This module implements a generic doubled linked list.
-
+# TODO Remove this and replace it with something sensible
+import os
 type 
   PListEntry* = ref TListEntry
   TListEntry* = object of TObject
@@ -103,11 +104,12 @@ proc bringToFront*(list: var TLinkedList, entry: PListEntry) =
     entry.next = list.head
     list.head = entry
 
-proc excludeStr*(list: var TLinkedList, data: string) =
+proc excludePath*(list: var TLinkedList, data: string) =
   var it = list.head
   while it != nil:
     let nxt = it.next
-    if PStrEntry(it).data == data: remove(list, it)
+    if cmpPaths(PStrEntry(it).data, data) == 0:
+      remove(list, it)
     it = nxt
 
 proc find*(list: TLinkedList, fn: TCompareProc, closure: pointer): PListEntry =