[FIX] fileUrlToString-ls
Lex Spoon
lex at cc.gatech.edu
Sat Jun 1 23:38:52 UTC 2002
The fix below relies on (FileDirectory on: '') giving a working file
directory on some sort of root directory. This appears to work on Unix.
If it works elsewhere, then maybe this fixes the problem Rudi Angela
reported. If it doesn't work, maybe people more knowledgable of other
platforms' code could implement reasonable FileDirectory class>>root
methods for them?
from preamble:
"Change Set: fileUrlToString-ls
Date: 1 June 2002
Author: Lex Spoon
Fix a bug reported by Rudi Angela. The following code illustrates the
problem on Windows and MacOS; there will be an extra $/ at the beginning
of the URL before this changeset.
| dir file |
dir := ServerDirectory new fullPath: (FileDirectory default url).
file := dir asServerFileNamed: 'test.txt'.
Transcript show: (file fileNameRelativeTo: dir); cr.
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileUrlToString-ls.cs.gz
Type: application/octet-stream
Size: 1035 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020601/8d0d6a89/fileUrlToString-ls.cs.obj
More information about the Squeak-dev
mailing list
|