[BUG] [FIX] unable to open files on macintosh root volumes

John M McIntosh johnmci at smalltalkconsulting.com
Fri Jun 20 00:27:19 UTC 2003


"Richard A. O'Keefe" <ok at cs.otago.ac.nz>  noted he couldn't open a PICT  
file on a zip disk, and earlier this evening I discovered I couldn't  
open '.hidden' on my os-x root volume. This is a bug.

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:foobar.txt  
is a absolute pathname

This method is only used from these two places.

MacFileDirectory>>fullPathFor: path
  called by FileDirectory>>fullNameFor: fileName  (which is called from  
a zillion places).
  which breaks the fileName into the localName (foobar.txt) and the  
filePath (fum)
when we pass fum into isAbsolute yes it is a volume name, thus an  
absolute path name. The original test
considered only if the first character was a ':' or if it contained a  
':'

MacFileDirectory class>>makeAbsolute:
  called from ZipArchiveMember>>localFileName
  In this case if you supply /fum/foobar.txt, that becomes  
:fum:foobar.txt which
  always fails the isAbsolute test.
If the localFileName is say foobar.txt then the logic in  
ZipArchiveMember>>localFileName
calls MacFileDirectory class>>makeRelative: which makes the file  
:foobar.txt

However maybe someone who's a bit more knowledgable about  
zips/sars/archives/etc could confirm if
it works ok. Remember to work at the root directory level, versus down  
in your documents folder. Working
on a zip disk would great to avoid clutter on your main boot drive I'd  
guess.

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MacRootPathNameFix-JMM.1.cs.gz
Type: application/x-gzip
Size: 554 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030619/a3876b1a/MacRootPathNameFix-JMM.1.cs.bin


More information about the Squeak-dev mailing list