Be consistent with method description

This commit is contained in:
Matt Nadareski
2025-01-09 04:15:10 -05:00
parent d8526d4927
commit 45a5611d20

View File

@@ -82,7 +82,7 @@ namespace SabreTools.DatFiles
// If the description is defined but not the name, set the name from the description
if (string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(description))
{
Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, description);
Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, description + (bare ? string.Empty : $" ({date})"));
}
// If the name is defined but not the description, set the description from the name
@@ -99,7 +99,7 @@ namespace SabreTools.DatFiles
Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, splitpath[splitpath.Length - 1]);
Header.SetFieldValue<string?>(Models.Metadata.Header.DescriptionKey, splitpath[splitpath.Length - 1] + (bare ? string.Empty : $" ({date})"));
#else
Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, splitpath[^1]);
Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, splitpath[^1] + (bare ? string.Empty : $" ({date})"));
Header.SetFieldValue<string?>(Models.Metadata.Header.DescriptionKey, splitpath[^1] + (bare ? string.Empty : $" ({date})"));
#endif
}