[FIX][ENH] FileUrlRewrite-gk

goran.krampe at bluefish.se goran.krampe at bluefish.se
Thu Feb 12 23:05:32 UTC 2004


from preamble:

"Change Set:		FileUrlRewrite
Date:			12 February 2004
Author:			Göran Krampe

Note: This changeset may have side effects, we simply need to test drive
it (Filelist with FTP etc).

A problem that cropped up with Scamper was a fix Markus made in update
5414. Markus made FileUrl>>pathForFile and #pathForDirectory to prepend
the pathName delimiter if the FileUrl is absolute.

The refinement is to avoid prepending if the file url has a path that
starts with a DOS style drive letter, since such paths are absolute per
definition.

This triggered a BIG make-over of FileUrl, where it was made much more
proper by using 'file://' as the prefix instead of 'file:'. According to
the RFCs a file URL can not have relative file paths, the isAbsolute etc
still works but the result sending toText (which I didn't bother to
change even though it has a strange name) will be proper and does not
reflect isAbsolute.

I have taken care of adding 'smarts' on how FileUrl creates itself given
a non valid String representation - it tries to be quite helpful. This
is partly based on what Mozilla does in this regard.

Now it is IMHO much improved, seems to work, has a bunch of new tests
(posted separately), and Scamper works fine from filelist on DOS drives.
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileUrlRewrite-gk.cs.gz
Type: application/octet-stream
Size: 5772 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040213/56f411c4/FileUrlRewrite-gk.cs.obj


More information about the Squeak-dev mailing list