--- a/URI.st Fri Jan 28 10:11:31 2005 +0100
+++ b/URI.st Tue Feb 01 13:41:37 2005 +0100
@@ -43,12 +43,17 @@
|i scheme rest|
i := aString indexOf:$:.
- i == 0 ifTrue:[
- self error:('Missing scheme in: %1!!' bindWith:aString)
+ i == 0 ifTrue:[
+ (aString startsWith:$/) ifTrue:[
+ scheme := #file.
+ rest := aString.
+ ] ifFalse:[
+ self error:('Missing scheme in: %1!!' bindWith:aString).
+ ].
+ ] ifFalse:[
+ scheme := aString copyFrom:1 to:i-1.
+ rest := aString copyFrom:i+1.
].
- scheme := aString copyFrom:1 to:i-1.
- rest := aString copyFrom:i+1.
-
^ (self classForScheme:scheme) scheme:scheme fromString:rest
@@ -294,5 +299,5 @@
!URI class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/URI.st,v 1.11 2004-03-05 19:02:22 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/URI.st,v 1.12 2005-02-01 12:41:07 stefan Exp $'
! !