mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Merge branch 'master' into ui-separation-and-xpc
This commit is contained in:
commit
fe79d29665
1 file changed
+3
-7
@@ -42,17 +42,13 @@
|
||||
@".tar.xz" : extractTXZ,
|
||||
@".txz" : extractTXZ,
|
||||
@".tar.lzma" : extractTXZ
|
||||
};
|
||||
};
|
||||
|
||||
NSString *lastPathComponent = [path lastPathComponent];
|
||||
for (NSString *currentType in extractCommandDictionary)
|
||||
{
|
||||
NSArray<NSString *> *value = [extractCommandDictionary objectForKey:currentType];
|
||||
assert(value != nil);
|
||||
|
||||
if ([currentType length] > [lastPathComponent length]) continue;
|
||||
if ([[lastPathComponent substringFromIndex:[lastPathComponent length] - [currentType length]] isEqualToString:currentType]) {
|
||||
return value;
|
||||
if ([lastPathComponent hasSuffix:currentType]) {
|
||||
return [extractCommandDictionary objectForKey:currentType];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
|
||||
Reference in new issue
Block a user