diff --git a/RombaSharp/Features/Diffdat.cs b/RombaSharp/Features/Diffdat.cs
index 1071fddb..8eaa80c0 100644
--- a/RombaSharp/Features/Diffdat.cs
+++ b/RombaSharp/Features/Diffdat.cs
@@ -45,7 +45,7 @@ in -old DAT file. Ignores those entries in -old that are not in -new.";
string? outdat = GetString(features, OutStringValue);
// Ensure the output directory
- outdat = outdat?.Ensure(create: true);
+ outdat = (outdat ?? string.Empty).Ensure(create: true);
// Check that all required files exist
if (!File.Exists(olddat))
diff --git a/RombaSharp/Features/Dir2Dat.cs b/RombaSharp/Features/Dir2Dat.cs
index f7ee6adf..8b581e57 100644
--- a/RombaSharp/Features/Dir2Dat.cs
+++ b/RombaSharp/Features/Dir2Dat.cs
@@ -44,7 +44,7 @@ namespace RombaSharp.Features
string? outdat = GetString(features, OutStringValue);
// Ensure the output directory
- outdat = outdat?.Ensure(create: true);
+ outdat = (outdat ?? string.Empty).Ensure(create: true);
// Check that all required directories exist
if (!Directory.Exists(source))
diff --git a/RombaSharp/Features/EDiffdat.cs b/RombaSharp/Features/EDiffdat.cs
index b9f0458e..9fdd9618 100644
--- a/RombaSharp/Features/EDiffdat.cs
+++ b/RombaSharp/Features/EDiffdat.cs
@@ -40,7 +40,7 @@ namespace RombaSharp.Features
string? newdat = GetString(features, NewStringValue);
// Ensure the output directory
- outdat = outdat?.Ensure(create: true);
+ outdat = (outdat ?? string.Empty).Ensure(create: true);
// Check that all required files exist
if (!File.Exists(olddat))
diff --git a/SabreTools.DatTools/Statistics.cs b/SabreTools.DatTools/Statistics.cs
index 2054b79f..71d098b3 100644
--- a/SabreTools.DatTools/Statistics.cs
+++ b/SabreTools.DatTools/Statistics.cs
@@ -171,7 +171,7 @@ namespace SabreTools.DatTools
reportName = "report";
// Get the proper output directory name
- outDir = outDir?.Ensure();
+ outDir = (outDir ?? string.Empty).Ensure();
InternalStopwatch watch = new($"Writing out report data to '{outDir}'");
diff --git a/SabreTools.DatTools/Writer.cs b/SabreTools.DatTools/Writer.cs
index 3fa5c837..883261e2 100644
--- a/SabreTools.DatTools/Writer.cs
+++ b/SabreTools.DatTools/Writer.cs
@@ -39,7 +39,7 @@ namespace SabreTools.DatTools
/// True if the DAT was written correctly, false otherwise
public static bool Write(
DatFile datFile,
- string ?outDir,
+ string? outDir,
bool overwrite = true,
bool ignoreblanks = false,
bool quotes = true,
@@ -53,7 +53,7 @@ namespace SabreTools.DatTools
}
// Ensure the output directory is set and created
- outDir = outDir?.Ensure(create: true);
+ outDir = (outDir ?? string.Empty).Ensure(create: true);
InternalStopwatch watch = new($"Writing out internal dat to '{outDir}'");
diff --git a/SabreTools/Features/Split.cs b/SabreTools/Features/Split.cs
index 50d7d412..386807b4 100644
--- a/SabreTools/Features/Split.cs
+++ b/SabreTools/Features/Split.cs
@@ -68,7 +68,7 @@ namespace SabreTools.Features
Parser.ParseInto(internalDat, file);
// Get the output directory
- OutputDir = OutputDir?.Ensure();
+ OutputDir = (OutputDir ?? string.Empty).Ensure();
OutputDir = file.GetOutputPath(OutputDir, GetBoolean(features, InplaceValue));
// Extension splitting
diff --git a/SabreTools/Features/Update.cs b/SabreTools/Features/Update.cs
index 19ab16a1..d696ae41 100644
--- a/SabreTools/Features/Update.cs
+++ b/SabreTools/Features/Update.cs
@@ -149,7 +149,7 @@ namespace SabreTools.Features
List basePaths = PathTool.GetFilesOnly(GetList(features, BaseDatListValue));
// Ensure the output directory
- OutputDir = OutputDir?.Ensure();
+ OutputDir = (OutputDir ?? string.Empty).Ensure();
// If we're in standard update mode, run through all of the inputs
if (updateMode == UpdateMode.None)