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