558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
|
if (type == nil || [type isEqual: @"auto"]) {
/* This one has to be first for obvious reasons */
if ([path hasSuffix: @".tar.gz"] || [path hasSuffix: @".tgz"] ||
[path hasSuffix: @".TAR.GZ"] || [path hasSuffix: @".TGZ"])
type = @"tgz";
else if ([path hasSuffix: @".gz"] || [path hasSuffix: @".GZ"])
type = @"gz";
else if ([path hasSuffix: @".lha"] || [path hasSuffix: @".lzh"])
type = @"lha";
else if ([path hasSuffix: @".tar"] || [path hasSuffix: @".TAR"])
type = @"tar";
else
type = @"zip";
}
|
|
>
|
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
|
if (type == nil || [type isEqual: @"auto"]) {
/* This one has to be first for obvious reasons */
if ([path hasSuffix: @".tar.gz"] || [path hasSuffix: @".tgz"] ||
[path hasSuffix: @".TAR.GZ"] || [path hasSuffix: @".TGZ"])
type = @"tgz";
else if ([path hasSuffix: @".gz"] || [path hasSuffix: @".GZ"])
type = @"gz";
else if ([path hasSuffix: @".lha"] ||
[path hasSuffix: @".lzh"] || [path hasSuffix: @".lzs"])
type = @"lha";
else if ([path hasSuffix: @".tar"] || [path hasSuffix: @".TAR"])
type = @"tar";
else
type = @"zip";
}
|