mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatTools] Failsafe for empty DATs
This commit is contained in:
@@ -2409,6 +2409,12 @@ namespace SabreTools.Helper
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static bool WriteDatfile(Dat datdata, string outDir, Logger logger, bool norename = true, bool stats = false, bool ignoreblanks = false)
|
public static bool WriteDatfile(Dat datdata, string outDir, Logger logger, bool norename = true, bool stats = false, bool ignoreblanks = false)
|
||||||
{
|
{
|
||||||
|
// If there's nothing there, abort
|
||||||
|
if (datdata.Files == null || datdata.Files.Count == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// If the DAT has no output format, default to XML
|
// If the DAT has no output format, default to XML
|
||||||
if (datdata.OutputFormat == OutputFormat.None)
|
if (datdata.OutputFormat == OutputFormat.None)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user