mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix directory ensurance until library fixed
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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}'");
|
||||
|
||||
|
||||
@@ -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}'");
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user