--- a/DirectoryContents.st Wed Oct 22 18:11:08 2008 +0200
+++ b/DirectoryContents.st Thu Oct 23 08:12:15 2008 +0200
@@ -573,36 +573,41 @@
!
updateInfo
- "ensure that the file-info is present"
+ "ensure that the file-info is present
+DirectoryContents flushCache
+"
- |mountPoints mountPoint nameString|
+ |mountPoints mountPoint nameString linkName|
info isNil ifTrue:[
nameString := fileName name.
self assert:[fileName isAbsolute].
mountPoints := self cachedRemoteMountPoints.
info := fileName linkInfo.
+
(info notNil and:[info isSymbolicLink]) ifTrue:[
-"/ |linkName|
-"/ "have to check for both link and link target"
-"/ linkName := info path.
-"/ linkName notNil ifTrue:[
-"/ mountPoint := mountPoints
-"/ detect:[:mInfo | |p|
-"/ p := mInfo mountPointPath.
-"/ ((linkName startsWith:p) and:[ linkName startsWith:(p , '/') ])
-"/ ]
-"/ ifNone:nil.
-"/ ].
-"/ info := fileName info. "get the info of the link target"
+ OperatingSystem isMSWINDOWSlike ifFalse:[
+ linkName := info path.
+ linkName notNil ifTrue:[
+ "have to check for both link and link target"
+ mountPoint := mountPoints
+ detect:[:mInfo | |p|
+ p := mInfo mountPointPath.
+ ((linkName startsWith:p) and:[ linkName startsWith:(p , '/') ])
+ ]
+ ifNone:nil.
+
+ info := fileName info. "get the info of the link target"
+ ].
+ ].
] ifFalse:[
"have to check for mountPoint only"
mountPoint := mountPoints
detect:[:mInfo | mInfo mountPointPath = nameString ]
ifNone:nil.
].
- (mountPoint notNil) ifTrue:[
+ mountPoint notNil ifTrue:[
info := #remoteDirectory.
] ifFalse:[
info isNil ifTrue:[
@@ -636,7 +641,7 @@
!DirectoryContents class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/DirectoryContents.st,v 1.43 2008-10-22 16:11:08 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/DirectoryContents.st,v 1.44 2008-10-23 06:12:15 ca Exp $'
! !
DirectoryContents initialize!