'From Squeak3.4alpha of ''11 November 2002'' [latest update: #5125] on 23 November 2002 at 5:16:01 am'! "Change Set: MacRelativeFNFix-nk Date: 23 November 2002 Author: Ned Konz The SARInstaller didn't work on the Connectors package because it wasn't able to make the required subdirectories. This change set fixes the handling of relative and absolute filenames under MacOS, and uses these conventions: * fileName starts with :: -> absolute * fileName starts with : -> relative * fileName starts with the name of a folder under the root -> absolute * otherwise -> relative It also fixes ArchiveViewer to use the previously-fixed extraction code in ZipArchiveMember. "! !ArchiveViewer methodsFor: 'archive operations' stamp: 'nk 11/23/2002 05:13'! extractAll | directory | self canExtractAll ifFalse: [^self]. [directory := FileList2 modalFolderSelector ifNil: [^self]. (self extractAllPossibleInDirectory: directory) ifTrue: [self members do: [:ea | ea extractInDirectory: directory ]. ^self]. PopUpMenu confirm: 'Try again?'] whileTrue! ! !MacFileDirectory methodsFor: 'file operations' stamp: 'nk 11/23/2002 04:53'! fullPathFor: path "Return the fully-qualified path name for the given file." path isEmptyOrNil ifTrue: [^ pathName]. (self class isAbsolute: path) ifTrue: [^ path]. ^ pathName = '' "Root dir?" ifTrue: [ path] ifFalse: [pathName , ':' , path]! ! !MacFileDirectory class methodsFor: 'class initialization' stamp: 'nk 11/23/2002 04:28'! isAbsolute: fileName "Return true if the given fileName is absolute. The cues are: * fileName starts with :: -> absolute * fileName starts with : -> relative * fileName starts with the name of a folder under the root -> absolute * otherwise -> relative" ^fileName first = $: ifTrue: [ (fileName second = $:) ] ifFalse: [ FileDirectory root directoryExists: (fileName copyUpTo: $:) ]! ! ArchiveViewer removeSelector: #extractDirectoryMember:intoDirectory:! ArchiveViewer removeSelector: #extractFileMember:intoDirectory:!