[DatFile, SabreTools, Utilities] Fix DFD hashing issue

This commit is contained in:
Matt Nadareski
2017-11-26 21:00:49 -08:00
parent f9c6a5ec82
commit de7d144e00
3 changed files with 11 additions and 2 deletions

View File

@@ -3332,7 +3332,8 @@ namespace SabreTools.Library.DatFiles
// If neither the name or description are defined, set them from the automatic values // If neither the name or description are defined, set them from the automatic values
else if (String.IsNullOrWhiteSpace(Name) && String.IsNullOrWhiteSpace(Description)) else if (String.IsNullOrWhiteSpace(Name) && String.IsNullOrWhiteSpace(Description))
{ {
Name = basePath.Split(Path.DirectorySeparatorChar).Last(); string[] splitpath = basePath.Split(Path.DirectorySeparatorChar);
Name = String.IsNullOrWhiteSpace(splitpath.Last()) ? splitpath[splitpath.Length - 2] : splitpath.Last();
Description = Name + (bare ? "" : " (" + Date + ")"); Description = Name + (bare ? "" : " (" + Date + ")");
} }

View File

@@ -1560,6 +1560,10 @@ namespace SabreTools.Library.Tools
{ {
input.Seek(offset, SeekOrigin.Begin); input.Seek(offset, SeekOrigin.Begin);
} }
else
{
input.Seek(0, SeekOrigin.Begin);
}
} }
catch (NotSupportedException) catch (NotSupportedException)
{ {
@@ -1630,6 +1634,10 @@ namespace SabreTools.Library.Tools
{ {
input.Seek(offset, SeekOrigin.Begin); input.Seek(offset, SeekOrigin.Begin);
} }
else
{
input.Seek(0, SeekOrigin.Begin);
}
} }
catch (NotSupportedException) catch (NotSupportedException)
{ {

View File

@@ -139,7 +139,7 @@ namespace SabreTools
// If it was a success, write the DAT out // If it was a success, write the DAT out
if (success) if (success)
{ {
datdata.WriteToFile(outDir); datdata.Write(outDir);
} }
// Otherwise, show the help // Otherwise, show the help