mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Support ancient .NET in DatTools
This commit is contained in:
@@ -146,31 +146,31 @@ namespace SabreTools.DatTools
|
||||
private static void EnsureHeaderFields(DatFile datFile)
|
||||
{
|
||||
// Empty FileName
|
||||
if (string.IsNullOrWhiteSpace(datFile.Header.FileName))
|
||||
if (string.IsNullOrEmpty(datFile.Header.FileName))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(datFile.Header.Name) && string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
if (string.IsNullOrEmpty(datFile.Header.Name) && string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.FileName = datFile.Header.Name = datFile.Header.Description = "Default";
|
||||
|
||||
else if (string.IsNullOrWhiteSpace(datFile.Header.Name) && !string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
else if (string.IsNullOrEmpty(datFile.Header.Name) && !string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.FileName = datFile.Header.Name = datFile.Header.Description;
|
||||
|
||||
else if (!string.IsNullOrWhiteSpace(datFile.Header.Name) && string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
else if (!string.IsNullOrEmpty(datFile.Header.Name) && string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.FileName = datFile.Header.Description = datFile.Header.Name;
|
||||
|
||||
else if (!string.IsNullOrWhiteSpace(datFile.Header.Name) && !string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
else if (!string.IsNullOrEmpty(datFile.Header.Name) && !string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.FileName = datFile.Header.Description;
|
||||
}
|
||||
|
||||
// Filled FileName
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(datFile.Header.Name) && string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
if (string.IsNullOrEmpty(datFile.Header.Name) && string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.Name = datFile.Header.Description = datFile.Header.FileName;
|
||||
|
||||
else if (string.IsNullOrWhiteSpace(datFile.Header.Name) && !string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
else if (string.IsNullOrEmpty(datFile.Header.Name) && !string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.Name = datFile.Header.Description;
|
||||
|
||||
else if (!string.IsNullOrWhiteSpace(datFile.Header.Name) && string.IsNullOrWhiteSpace(datFile.Header.Description))
|
||||
else if (!string.IsNullOrEmpty(datFile.Header.Name) && string.IsNullOrEmpty(datFile.Header.Description))
|
||||
datFile.Header.Description = datFile.Header.Name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user