mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: don't adjust boot log path in release mode
This commit is contained in:
parent
694159a510
commit
221bef8df8
1 changed files with 6 additions and 6 deletions
|
|
@ -118,15 +118,15 @@ namespace Dalamud.Injector
|
||||||
private static string GetLogPath(string? baseDirectory, string fileName, string? logName)
|
private static string GetLogPath(string? baseDirectory, string fileName, string? logName)
|
||||||
{
|
{
|
||||||
baseDirectory ??= Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
baseDirectory ??= Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||||
|
baseDirectory ??= Environment.CurrentDirectory;
|
||||||
fileName = !string.IsNullOrEmpty(logName) ? $"{fileName}-{logName}.log" : $"{fileName}.log";
|
fileName = !string.IsNullOrEmpty(logName) ? $"{fileName}-{logName}.log" : $"{fileName}.log";
|
||||||
|
|
||||||
#if DEBUG
|
// TODO(api9): remove
|
||||||
var logPath = Path.Combine(baseDirectory, fileName);
|
var previousLogPath = Path.Combine(baseDirectory, "..", "..", "..", fileName);
|
||||||
#else
|
if (File.Exists(previousLogPath))
|
||||||
var logPath = Path.Combine(baseDirectory, "..", "..", "..", fileName);
|
File.Delete(previousLogPath);
|
||||||
#endif
|
|
||||||
|
|
||||||
return logPath;
|
return Path.Combine(baseDirectory, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Init(List<string> args)
|
private static void Init(List<string> args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue