--- a/FileSelectionBrowser.st Thu Sep 24 12:51:34 1998 +0200
+++ b/FileSelectionBrowser.st Thu Sep 24 16:57:14 1998 +0200
@@ -333,12 +333,31 @@
!
setRootForFile:aFilename
+ |f root d parent|
+
+ f := aFilename asFilename.
+ root := Filename rootDirectoryOnVolume:f volume.
+
+ "/ on some systems, the root itself is not readable,
+ "/ but subdirs are (WIN32-network drives and VMS)
+
+ (root exists and:[root isDirectory and:[root isReadable]])
+ ifFalse:[
+ "/ search backward from aFilename for the last readable dir.
+ root := f.
+ parent := root directory.
+ [parent exists and:[parent isDirectory and:[parent isReadable]]]
+ whileTrue:[
+ root := parent.
+ parent := root directory.
+ ].
+ ].
+
self rootOfDirectory
- value:(Filename
- rootDirectoryOnVolume:
- aFilename asFilename volume) pathName
+ value:root pathName
"Created: / 23.9.1998 / 16:36:28 / cg"
+ "Modified: / 24.9.1998 / 15:31:30 / cg"
!
valueOfFileName