mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(Xp3Opener): dispose of archive in case of encryption plugin initialization error.
This commit is contained in:
parent
977d4f215f
commit
7c10d0a874
@ -260,9 +260,17 @@ NextEntry:
|
||||
}
|
||||
}
|
||||
var arc = new ArcFile (file, this, dir);
|
||||
if (crypt_algorithm.IsValueCreated)
|
||||
crypt_algorithm.Value.Init (arc);
|
||||
return arc;
|
||||
try
|
||||
{
|
||||
if (crypt_algorithm.IsValueCreated)
|
||||
crypt_algorithm.Value.Init (arc);
|
||||
return arc;
|
||||
}
|
||||
catch
|
||||
{
|
||||
arc.Dispose();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
static readonly Regex ObfuscatedPathRe = new Regex (@"[^\\/]+[\\/]\.\.[\\/]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user