diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index 7eb1f3bb..cbf8010c 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -3826,6 +3826,12 @@ namespace SabreTools.Library.DatFiles datItem.MachineName = gamename; datItem.MachineDescription = gamename; + // If we have a Disk, then the ".chd" extension needs to be removed + if (datItem.Type == ItemType.Disk) + { + datItem.Name = datItem.Name.Replace(".chd", ""); + } + // Add the file information to the DAT Add(key, datItem); diff --git a/SabreTools.Library/Tools/FileTools.cs b/SabreTools.Library/Tools/FileTools.cs index 12430aed..236cead8 100644 --- a/SabreTools.Library/Tools/FileTools.cs +++ b/SabreTools.Library/Tools/FileTools.cs @@ -264,12 +264,6 @@ namespace SabreTools.Library.Tools ((Rom)datItem).Date = (date ? new FileInfo(input).LastWriteTime.ToString("yyyy/MM/dd HH:mm:ss") : ""); } - // If we have a Disk, then the ".chd" extension needs to be removed - if (datItem.Type == ItemType.Disk) - { - datItem.Name = datItem.Name.Replace(".chd", ""); - } - return datItem; }