HierarchicalFileList.st
changeset 2734 4934113dc4c0
parent 2654 d6925414a41d
child 2766 04990ee7e604
--- a/HierarchicalFileList.st	Thu Aug 05 12:34:26 2004 +0200
+++ b/HierarchicalFileList.st	Fri Aug 13 21:30:55 2004 +0200
@@ -945,13 +945,16 @@
 !HierarchicalFileList::Directory methodsFor:'fetching'!
 
 basicFetchIndicator
-    |linkName fileName hasChildren|
+    |linkName fileName hasChildren info|
 
     fileName := self fileName.
-    linkName := fileName name.
-    fileName isSymbolicLink ifTrue:[
-        linkName := fileName linkInfo path.
+    info := fileName linkInfo.
+    (info notNil and:[info isSymbolicLink]) ifTrue:[
+        linkName := info path.
+    ] ifFalse:[
+        linkName := fileName name.
     ].
+        
     (OperatingSystem mountPoints contains:[:mp | mp mountPointPath = linkName]) ifTrue:[
         "do not follow mounted directories automatically (could be an NFS hardlink)"
         ^ self.
@@ -959,12 +962,11 @@
 
     hasChildren := DirectoryContents directoryNamed:fileName detect:(self model matchBlock).
     self knownToHaveChildren:hasChildren.
-    children notNil ifTrue:[self halt:'oops'].
+    self assert:children isNil.
 
-    children isNil ifTrue:[
-        "setup modification time to suppress monitorCycle
-        "
-        modificationTime := fileName modificationTime.
+    (children isNil and:[info notNil]) ifTrue:[
+        "setup modification time to suppress monitorCycle"
+        modificationTime := info modificationTime.
     ].
 !
 
@@ -1142,19 +1144,16 @@
 
 monitoringCycle
     "run monitoring cycle
-        !!!!!!!! called by the HierarchicalList only !!!!!!!!
-    "
-    |fileName unusedDict addedItems mergedList size modifyTime model timeChanged|
+        !!!!!!!! called by the HierarchicalList only !!!!!!!!"
+
+    |fileName unusedDict addedItems mergedList size modifyTime model timeChanged info|
 
     fileName := self fileName.
-    fileName isSymbolicLink ifTrue:[
-        modifyTime := fileName linkInfo modificationTime.
-    ] ifFalse:[
-        modifyTime := fileName modificationTime.
-    ].
-    modifyTime isNil ifTrue:[^ self].
+    info := fileName linkInfo.
+    info isNil ifTrue:[^ self].
 
-    timeChanged := (modificationTime isNil or:[modifyTime ~= modificationTime]).
+    modifyTime := info modificationTime.
+    timeChanged := modifyTime ~= modificationTime.
     modificationTime := modifyTime.
 
     children notNil ifTrue:[
@@ -1256,7 +1255,7 @@
 !HierarchicalFileList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalFileList.st,v 1.51 2004-02-25 07:24:49 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalFileList.st,v 1.52 2004-08-13 19:30:55 stefan Exp $'
 ! !
 
 HierarchicalFileList::Directory initialize!