[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
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 + ")");
}