Skip to content

Commit c6dec54

Browse files
Mpdreamzrusscam
authored andcommitted
RestSpecDownloader uses windows path separator (#4207)
* RestSpecDownloader uses windows path separator * don't be lazy use Path.Combine' (cherry picked from commit 17dbd2e) (cherry picked from commit 4adb9b5)
1 parent bd3f079 commit c6dec54

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/CodeGeneration/ApiGenerator/RestSpecDownloader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private void DownloadJsonDefinitions(Specification spec, IProgressBar pbar)
6060

6161
private void FindJsonFilesOnListing(Specification spec, string html, IProgressBar pbar)
6262
{
63-
if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder))
63+
if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder))
6464
Directory.CreateDirectory(GeneratorLocations.RestSpecificationFolder);
6565

6666
var dom = CQ.Create(html);
@@ -92,7 +92,8 @@ private void WriteToEndpointsFolder(string folder, string filename, string conte
9292
{
9393
var f = Path.Combine(GeneratorLocations.RestSpecificationFolder, folder);
9494
if (!Directory.Exists(f)) Directory.CreateDirectory(f);
95-
File.WriteAllText(f + "\\" + filename, contents);
95+
var target = Path.Combine(f, filename);
96+
File.WriteAllText(target, contents);
9697
}
9798

9899
private class Specification

0 commit comments

Comments
 (0)