Skip to content

Commit

Permalink
Fix debug log path
Browse files Browse the repository at this point in the history
  • Loading branch information
hrntsm committed Dec 28, 2023
1 parent d55046b commit 0de8b94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tunny/UI/OptimizeWindowTab/FileTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ private void SetResultFilePathButton_Click(object sender, EventArgs e)

private void OutputDebugLogButton_Click(object sender, EventArgs e)
{
if (File.Exists(TunnyVariables.TunnyEnvPath + "\\debug.log"))
{
File.Delete(TunnyVariables.TunnyEnvPath + "\\debug.log");
}
using (var process = new Process())
{
process.StartInfo.FileName = "PowerShell.exe";
process.StartInfo.Arguments = $"tree {_component.GhInOut.ComponentFolder} /f > {TunnyVariables.TunnyEnvPath}\\debug.log";
process.StartInfo.Arguments = $"tree {TunnyVariables.TunnyEnvPath} > {TunnyVariables.TunnyEnvPath}\\debug.log";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.Start();
}
TunnyMessageBox.Show("Debug log file is created at\n" + _component.GhInOut.ComponentFolder + "\\debug.log", "Tunny");
TunnyMessageBox.Show("Debug log file is created at\n" + TunnyVariables.TunnyEnvPath + "\\debug.log", "Tunny");
}
}
}

0 comments on commit 0de8b94

Please sign in to comment.