added CanCreate property.

This commit is contained in:
morkt 2014-07-26 23:12:05 +04:00
parent 5019124514
commit bedba61ff5

View File

@ -21,6 +21,7 @@ namespace GameRes.Formats
public override string Description { get { return Strings.arcStrings.XFLDescription; } } public override string Description { get { return Strings.arcStrings.XFLDescription; } }
public override uint Signature { get { return 0x0001424c; } } public override uint Signature { get { return 0x0001424c; } }
public override bool IsHierarchic { get { return false; } } public override bool IsHierarchic { get { return false; } }
public override bool CanCreate { get { return true; } }
public override ArcFile TryOpen (ArcView file) public override ArcFile TryOpen (ArcView file)
{ {
@ -71,9 +72,9 @@ namespace GameRes.Formats
// first, write names only // first, write names only
foreach (var entry in list) foreach (var entry in list)
{ {
string name = Path.GetFileName (entry.Name);
try try
{ {
string name = Path.GetFileName (entry.Name);
int size = encoding.GetBytes (name, 0, name.Length, name_buf, 0); int size = encoding.GetBytes (name, 0, name.Length, name_buf, 0);
if (size < name_buf.Length) if (size < name_buf.Length)
name_buf[size] = 0; name_buf[size] = 0;