Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit ec8c88a

Browse files
committed
Actually fix Logs folder
1 parent 0eae78e commit ec8c88a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/UI/Panels/LogPanel.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ public override void SetActive(bool active)
6161

6262
private void SetupIO()
6363
{
64+
var fileName = $"UnityExplorer {DateTime.Now:u}.txt";
65+
fileName = IOUtility.EnsureValidFilename(fileName);
6466
var path = Path.Combine(ExplorerCore.Loader.ExplorerFolder, "Logs");
65-
//path = IOUtility.EnsureValidFilePath(path);
67+
CurrentStreamPath = IOUtility.EnsureValidFilePath(Path.Combine(path, fileName));
6668

6769
// clean old log(s)
6870
var files = Directory.GetFiles(path);
@@ -75,11 +77,6 @@ private void SetupIO()
7577
File.Delete(files[i]);
7678
}
7779

78-
var fileName = $"UnityExplorer {DateTime.Now:u}.txt";
79-
fileName = IOUtility.EnsureValidFilename(fileName);
80-
81-
CurrentStreamPath = IOUtility.EnsureValidFilePath(Path.Combine(path, fileName));
82-
8380
File.WriteAllLines(CurrentStreamPath, Logs.Select(it => it.message).ToArray());
8481
}
8582

0 commit comments

Comments
 (0)