mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(WagOpener): strip possible drive specification from file names.
This commit is contained in:
parent
6b62a1701d
commit
6acb80e5fd
@ -28,6 +28,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using GameRes.Utility;
|
||||
|
||||
namespace GameRes.Formats.Xuse
|
||||
@ -161,7 +162,7 @@ namespace GameRes.Formats.Xuse
|
||||
Entry entry;
|
||||
if (!string.IsNullOrEmpty (filename))
|
||||
{
|
||||
filename = filename.TrimStart ('\\');
|
||||
filename = DriveRe.Replace (filename, "");
|
||||
entry = FormatCatalog.Instance.CreateEntry (filename);
|
||||
}
|
||||
else
|
||||
@ -178,6 +179,8 @@ namespace GameRes.Formats.Xuse
|
||||
return new WagArchive (file, this, dir, data_key);
|
||||
}
|
||||
|
||||
static readonly Regex DriveRe = new Regex (@"^(?:.+:)?\\+");
|
||||
|
||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||
{
|
||||
var warc = arc as WagArchive;
|
||||
|
Loading…
x
Reference in New Issue
Block a user