[FIX]MacRootPathNameFix-JMM ([er][et]critical for both 3.6 and 3.7!!!)

Karl Ramberg karl.ramberg at chello.se
Fri Oct 10 08:25:20 UTC 2003


This seems to be the rigth fix.
It should go in both 3.6 and 3.7 
Karl

John M McIntosh wrote:
> 
> This fix posted back in June was never considered. Might check it
> 
> 'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 18 June
> 2003 at 11:34:11 pm'!
> "Change Set:            MacRootPathNameFix-JMM
> Date:                   18 June 2003
> Author:                 johnmci at smalltalkconsulting.com
> 
> Attempting to open a file 'foobar.txt' on Volume 'fum' will fail, the
> path is fum:foobar.txt. This change set alters MacFileDirectory
> class>>isAbsolute: to consider that fum is a root thus fum:foobat.txt
> is a absolute pathname"!
> 
> !MacFileDirectory class methodsFor: 'class initialization' stamp: 'JMM
> 6/18/2003 23:33'!
> isAbsolute: fileName
>         "Return true if the given fileName is absolute. The rules are:
> 
> If a path begins with a colon, it is relative.
> Otherwise,
>    If it contains a colon anywhere, it is absolute and the first
> component is the volume name.
>    Otherwise,
>      It is absolute because it is a volume name."
> 
>         fileName first = $: ifTrue: [^false].
>         (fileName includes: $:) ifTrue: [^true].
>         (fileName size > 0) ifTrue: [^true].
>         ^false! !
>



More information about the Squeak-dev mailing list