mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +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)
|
||||
{
|
||||
baseDirectory ??= Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
baseDirectory ??= Environment.CurrentDirectory;
|
||||
fileName = !string.IsNullOrEmpty(logName) ? $"{fileName}-{logName}.log" : $"{fileName}.log";
|
||||
|
||||
#if DEBUG
|
||||
var logPath = Path.Combine(baseDirectory, fileName);
|
||||
#else
|
||||
var logPath = Path.Combine(baseDirectory, "..", "..", "..", fileName);
|
||||
#endif
|
||||
// TODO(api9): remove
|
||||
var previousLogPath = Path.Combine(baseDirectory, "..", "..", "..", fileName);
|
||||
if (File.Exists(previousLogPath))
|
||||
File.Delete(previousLogPath);
|
||||
|
||||
return logPath;
|
||||
return Path.Combine(baseDirectory, fileName);
|
||||
}
|
||||
|
||||
private static void Init(List<string> args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue