Skip to content

Commit 9938ae6

Browse files
niemyjskiejsmith
authored andcommitted
Fixed xplat file paths
1 parent 54dc15b commit 9938ae6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

samples/Exceptionless.SampleConsole/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ private static void SendAllCapturedEventsFromDisk() {
338338
Console.WriteLine("Sending captured events...");
339339
}
340340

341-
string path = Path.GetFullPath(@"..\..\Errors\");
341+
string path = Path.GetFullPath(Path.Combine("..", "..", "Errors"));
342342
if (!Directory.Exists(path))
343343
return;
344344

samples/Exceptionless.SampleWindows/SampleLoader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ public SampleLoader(string sampleFolder) {
1212
public string SampleFolder { get; private set; }
1313

1414
public static string FindSamples() {
15-
string folder = Path.GetFullPath(@".\Samples");
15+
string folder = Path.GetFullPath("Samples");
1616
if (Directory.Exists(folder))
1717
return folder;
1818

19-
folder = Path.GetFullPath(@"..\Samples");
19+
folder = Path.GetFullPath(Path.Combine("..", "Samples"));
2020
if (Directory.Exists(folder))
2121
return folder;
2222

23-
folder = Path.GetFullPath(@"..\..\Samples");
23+
folder = Path.GetFullPath(Path.Combine("..", "..", "Samples"));
2424
if (Directory.Exists(folder))
2525
return folder;
2626

test/Exceptionless.Tests/Utility/ErrorDataReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static Event GetEvent(string fileName) {
2222
}
2323

2424
public static IEnumerable<Event> GetEvents() {
25-
return Directory.EnumerateFiles(@"..\..\..\ErrorData", "*.json").Select(GetEvent);
25+
return Directory.EnumerateFiles(Path.Combine("..", "..", "..", "ErrorData"), "*.json").Select(GetEvent);
2626
}
2727
}
2828
}

0 commit comments

Comments
 (0)