[FIX] Re: [BUG] Re: Bookmorphs not working in Linux?

Lex Spoon lex at cc.gatech.edu
Thu Jan 20 18:51:28 UTC 2000


> 
> Okay, I digged a little deeper into this.
> 
> The bug is in FileUrl>>pathForDirectory which ignores the isAbsolute inst
> var. The reason why it still works on a Mac seems to be
> MacFileDir>>fullPathFor: aPath - it simply does not check if aPath is
> absolute or relative, whereas the Win / Unix variants do. I'd consider the
> Mac behaviour a kludge that covers other inconsistencies.


Ahh.  Yes, relative file urls are a pain in general.  But there seems
no way around it, if you want to support both "file:/foo" and "file:foo".
And I'm sure this all worked at one time on Linux, but I think somebody
must have "fixed" something for Macs which messed it up on Unix.

Maybe someone who understands how relative paths work on Macs
can pipe up with whether your fix will work okay or not.  If there is
a problem, one approach we can take is to use "FileDirectory default"
when evaluating a relative path, and to thus do the relative->absolute
transformation from within Squeak.  Such an approach ought to be extremely
portable--the underlying OS wouldn't have to support relative paths
at all.



> But still, several methods wrongly generate file:// urls (like
> FileDirectory>>url, FileStream>>url, FileUrl>>totext). These should be
> corrected.

Good sleuthing!  These should certainly be fixed....


Lex





More information about the Squeak-dev mailing list