Fix directory ensurance until library fixed

This commit is contained in:
Matt Nadareski
2024-03-11 13:42:55 -04:00
parent 25d8d4faeb
commit 4db6d14ffb
7 changed files with 8 additions and 8 deletions

View File

@@ -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))

View File

@@ -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))

View File

@@ -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))

View File

@@ -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}'");

View File

@@ -39,7 +39,7 @@ namespace SabreTools.DatTools
/// <returns>True if the DAT was written correctly, false otherwise</returns>
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}'");

View File

@@ -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

View File

@@ -149,7 +149,7 @@ namespace SabreTools.Features
List<ParentablePath> 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)