archive/ArchiveLookup: remove "suffix" output parameter

Let the caller do this.  Our GetSuffix() function was broken anyway.
This commit is contained in:
Max Kellermann
2019-05-31 19:01:22 +02:00
parent 508ba22789
commit 12e75a523a
4 changed files with 15 additions and 31 deletions

View File

@@ -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) {