Fixed Not Exporting to the Proper User Directory

- Removed new line when choosing a topic
- Renamed newscycle.json to example.json in config
- Changed path to "/" in config
- If "/" is present in config, return the absolute current directory
This commit is contained in:
Tony Bark 2025-03-22 20:55:15 -04:00
parent 188318c724
commit 14537bba03
6 changed files with 37 additions and 18 deletions

View file

@ -63,4 +63,25 @@ internal static class Tracer
#endif
}
}
/// <summary>
/// Determines the appropriate output directory based on the given directory path.
/// In DEBUG mode, it always returns the current working directory.
/// In release mode, it returns the provided directory unless it contains a '/', in which case it defaults to the current directory.
/// </summary>
/// <param name="dir">The directory path to evaluate.</param>
/// <returns>The resolved output directory as a string.</returns>
internal static string OutputDirectory(string dir)
{
var curDir = Directory.GetCurrentDirectory();
#if DEBUG
return curDir;
#else
if (dir.Contains("/"))
return curDir;
return dir;
#endif
}
}