mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(ExtractImage): output path could contain directory name.
This commit is contained in:
@@ -193,7 +193,9 @@ namespace GARbro.GUI
|
|||||||
if (null == image)
|
if (null == image)
|
||||||
throw new InvalidFormatException (string.Format ("{1}: {0}", guiStrings.MsgUnableInterpret, entry.Name));
|
throw new InvalidFormatException (string.Format ("{1}: {0}", guiStrings.MsgUnableInterpret, entry.Name));
|
||||||
string target_ext = target_format.Extensions.First();
|
string target_ext = target_format.Extensions.First();
|
||||||
|
string outdir = Path.GetDirectoryName (entry.Name);
|
||||||
string outname = Path.GetFileNameWithoutExtension (entry.Name)+'.'+target_ext;
|
string outname = Path.GetFileNameWithoutExtension (entry.Name)+'.'+target_ext;
|
||||||
|
outname = Path.Combine (outdir, outname);
|
||||||
Trace.WriteLine (string.Format ("{0} => {1}", entry.Name, outname), "ExtractFileFromArchive");
|
Trace.WriteLine (string.Format ("{0} => {1}", entry.Name, outname), "ExtractFileFromArchive");
|
||||||
using (var outfile = File.Create (outname))
|
using (var outfile = File.Create (outname))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user