Skip to content

Commit cbb9475

Browse files
niemyjskiejsmith
authored andcommitted
Pass the resolved log path if available and get full path in exists and delete
1 parent 9938ae6 commit cbb9475

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/Exceptionless.Tests/Log/FileExceptionlessLogTestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public virtual void CanWriteToLogFile() {
1515
log.Info("Test");
1616
log.Flush();
1717

18-
Assert.True(LogExists());
18+
Assert.True(LogExists(log.FilePath));
1919
string contents = log.GetFileContents();
2020

2121
Assert.EndsWith(" Info Test\r\n", contents);
@@ -33,7 +33,7 @@ public virtual void LogFlushTimerWorks() {
3333

3434
Thread.Sleep(1010 * 3);
3535

36-
Assert.True(LogExists());
36+
Assert.True(LogExists(log.FilePath));
3737
contents = log.GetFileContents();
3838

3939
Assert.EndsWith(" Info Test\r\n", contents);

test/Exceptionless.Tests/Log/FileExceptionlessLogTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ protected override FileExceptionlessLog GetLog(string filePath) {
3535
}
3636

3737
protected override bool LogExists(string path = LOG_FILE) {
38-
return File.Exists(path);
38+
return File.Exists(Path.GetFullPath(path));
3939
}
4040

4141
protected override void DeleteLog(string path = LOG_FILE) {
4242
if (LogExists(path))
43-
File.Delete(path);
43+
File.Delete(Path.GetFullPath(path));
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)