Skip to content

Commit 166633d

Browse files
michaelnebeltamasvajk
authored andcommitted
C#: Only apply Path.combine to OS agnostic parts of the path.
1 parent d48ab36 commit 166633d

File tree

1 file changed

+2
-3
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp.Standalone

1 file changed

+2
-3
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/Razor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using Semmle.BuildAnalyser;
5-
using Semmle.Util;
65
using System.Text;
76

87
namespace Semmle.Extraction.CSharp.Standalone
@@ -21,14 +20,14 @@ public Razor(DotnetVersion sdk, DotNet dotNet, ProgressMonitor progressMonitor)
2120
this.progressMonitor = progressMonitor;
2221
this.dotNet = dotNet;
2322

24-
sourceGeneratorFolder = Path.Combine(this.sdk.FullPath, "Sdks/Microsoft.NET.Sdk.Razor/source-generators");
23+
sourceGeneratorFolder = Path.Combine(this.sdk.FullPath, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators");
2524
if (!Directory.Exists(sourceGeneratorFolder))
2625
{
2726
this.progressMonitor.RazorSourceGeneratorMissing(sourceGeneratorFolder);
2827
throw new Exception($"Razor source generator folder {sourceGeneratorFolder} does not exist.");
2928
}
3029

31-
cscPath = Path.Combine(this.sdk.FullPath, "Roslyn/bincore/csc.dll");
30+
cscPath = Path.Combine(this.sdk.FullPath, "Roslyn", "bincore", "csc.dll");
3231
if (!File.Exists(cscPath))
3332
{
3433
this.progressMonitor.CscMissing(cscPath);

0 commit comments

Comments
 (0)