@@ -532,10 +532,12 @@ file = OFStdIn; break; default: @throw [OFInvalidArgumentException exception]; } + + path = nil; } else { @try { file = [OFFile fileWithPath: path mode: fileModeString]; } @catch (OFOpenItemFailedException *e) { OFString *error = [OFString @@ -566,32 +568,37 @@ type = @"zip"; } @try { if ([type isEqual: @"gz"]) - archive = [GZIPArchive archiveWithStream: file - mode: modeString - encoding: encoding]; + archive = [GZIPArchive archiveWithPath: path + stream: file + mode: modeString + encoding: encoding]; else if ([type isEqual: @"lha"]) - archive = [LHAArchive archiveWithStream: file - mode: modeString - encoding: encoding]; + archive = [LHAArchive archiveWithPath: path + stream: file + mode: modeString + encoding: encoding]; else if ([type isEqual: @"tar"]) - archive = [TarArchive archiveWithStream: file - mode: modeString - encoding: encoding]; + archive = [TarArchive archiveWithPath: path + stream: file + mode: modeString + encoding: encoding]; else if ([type isEqual: @"tgz"]) { OFStream *GZIPStream = [OFGZIPStream streamWithStream: file mode: modeString]; - archive = [TarArchive archiveWithStream: GZIPStream - mode: modeString - encoding: encoding]; + archive = [TarArchive archiveWithPath: path + stream: GZIPStream + mode: modeString + encoding: encoding]; } else if ([type isEqual: @"zip"]) - archive = [ZIPArchive archiveWithStream: file - mode: modeString - encoding: encoding]; + archive = [ZIPArchive archiveWithPath: path + stream: file + mode: modeString + encoding: encoding]; else { [OFStdErr writeLine: OF_LOCALIZED( @"unknown_archive_type", @"Unknown archive type: %[type]", @"type", type)];