archive/ArchiveLookup: remove "suffix" output parameter
Let the caller do this. Our GetSuffix() function was broken anyway.
This commit is contained in:
@@ -44,9 +44,9 @@ OpenArchiveInputStream(Path path, Mutex &mutex)
|
||||
};
|
||||
|
||||
// archive_lookup will modify pname when true is returned
|
||||
const char *archive, *filename, *suffix;
|
||||
const char *archive, *filename;
|
||||
try {
|
||||
if (!archive_lookup(pname, &archive, &filename, &suffix)) {
|
||||
if (!archive_lookup(pname, &archive, &filename)) {
|
||||
FormatDebug(archive_domain,
|
||||
"not an archive, lookup %s failed", pname);
|
||||
return nullptr;
|
||||
@@ -57,6 +57,8 @@ OpenArchiveInputStream(Path path, Mutex &mutex)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char *suffix = Path::FromFS(archive).GetSuffix();
|
||||
|
||||
//check which archive plugin to use (by ext)
|
||||
arplug = archive_plugin_from_suffix(suffix);
|
||||
if (!arplug) {
|
||||
|
Reference in New Issue
Block a user