--- a/Filename.st Wed Mar 26 13:35:35 1997 +0100
+++ b/Filename.st Wed Mar 26 18:27:17 1997 +0100
@@ -464,21 +464,23 @@
If the argument names an absolute path, the first component will be the
name of the root directory (i.e. '/')."
- |components|
-
- components := aString asCollectionOfSubstringsSeparatedBy:(self separator).
+ |sep components|
+
+ sep := self separator.
+ components := aString asCollectionOfSubstringsSeparatedBy:sep.
components first isEmpty ifTrue:[
- components at:1 put:(self separator asString)
+ components at:1 put:(sep asString)
].
^ components
-
"
Filename components:'/foo/bar/baz'
Filename components:'foo/bar/baz'
+ Filename components:'foo/bar'
+ Filename components:'foo'
"
- "Modified: 29.2.1996 / 20:06:38 / cg"
+ "Modified: 26.3.1997 / 18:27:04 / cg"
!
errorReporter
@@ -2150,5 +2152,5 @@
!Filename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.79 1997-01-16 00:19:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.80 1997-03-26 17:27:17 cg Exp $'
! !