mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, SabreTools, Utilities] Fix DFD hashing issue
This commit is contained in:
@@ -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 + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user