'From Squeak3.7beta of ''1 April 2004'' [latest update: #5878] on 22 April 2004 at 6:07:07 pm'! "Change Set: ZipExtractMakeDirectoryFix-nk Date: 22 April 2004 Author: Ned Konz When you do an 'extract all' from the ArchiveViewer, subdirectories aren't created properly. This change set fixes that problem."! !ZipArchiveMember methodsFor: 'extraction' stamp: 'nk 4/22/2004 13:34'! extractInDirectory: aDirectory overwrite: overwriteAll "Extract this entry into the given directory. Answer #okay, #failed, #abort, or #retryWithOverwrite." | path fileDir file index localName | path := fileName findTokens:'/'. localName := path last. fileDir := path allButLast inject: aDirectory into:[:base :part| base directoryNamed: part]. fileDir assureExistence. file := [fileDir newFileNamed: localName] on: FileExistsException do:[:ex| ex return: nil]. file ifNil:[ overwriteAll ifFalse:[ [index := (PopUpMenu labelArray:{ 'Yes, overwrite'. 'No, don''t overwrite'. 'Overwrite ALL files'. 'Cancel operation' } lines: #(2)) startUpWithCaption: fileName, ' already exists. Overwrite?'. index == nil] whileTrue. index = 4 ifTrue:[^#abort]. index = 3 ifTrue:[^#retryWithOverwrite]. index = 2 ifTrue:[^#okay]. ]. file := [fileDir forceNewFileNamed: localName] on: Error do:[:ex| ex return]. file ifNil:[^#failed]. ]. self extractTo: file. file close. ^#okay! !