mirror of
https://github.com/tonytins/staggerpost.git
synced 2025-07-15 02:46:48 -04:00
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:
parent
188318c724
commit
14537bba03
6 changed files with 37 additions and 18 deletions
21
Tracer.cs
21
Tracer.cs
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue