[fix] 'file:/etc/profile' asUrl retrieveContents

Niko Schwarz niko.schwarz at gmx.net
Wed Feb 19 11:50:31 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

'file:/etc/profile' asUrl retrieveContents fails on unix, because it is 
converted into a relative filename during fetching. I wrote a fix which 
hopefully works on windows too.
Please take a look, regards,

nick
- -- 
"He is now rising from affluence to poverty."
		-- Mark Twain
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+U2+H3P3nmXTVnC8RAurqAJ9cV08ElKC9TCR7mvMo9ZHGpSXu0QCgi7co
RPceV874fCJn+3OQVI+bc6w=
=EDSB
-----END PGP SIGNATURE-----
-------------- next part --------------
'From Squeak3.4gamma of ''7 January 2003'' [latest update: #5168] on 19 February 2003 at 12:45:36 pm'!

!FileUrl methodsFor: 'access' stamp: 'NES 2/19/2003 12:41'!
pathForFile
	"Path using local file system's delimiter. $\ or $:"
	| delim |
	delim _ FileDirectory default pathNameDelimiter asString.
	^(isAbsolute
		ifTrue: [delim]
		ifFalse: [''])
		, (self path join: delim)! !


!SequenceableCollection methodsFor: 'accessing' stamp: 'NES 2/19/2003 12:43'!
join: delim 
	"Join the array into one string, with delim separating."
	^ String
		streamContents: [:s | self
				do: [:el | s nextPutAll: el]
				separatedBy: [s nextPutAll: delim asString]]! !



More information about the Squeak-dev mailing list