Skip to content

Commit

Permalink
Fix writing output on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
RA-Kooi committed Sep 11, 2022
1 parent 8e47fea commit 32a8f67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DwarfOne2C/CWriter/CWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public void GenerateCode(CompilationUnit unit)
|| splitPath.EndsWith('/'))
splitPath = splitPath.Remove(splitPath.Length - 1);

outputPath = unit.name.Replace(splitPath, outputDirectory);
outputPath = unit.name.Replace(splitPath, string.Empty);

if(Path.DirectorySeparatorChar == '/')
outputPath = outputPath.Replace('\\', '/');

outputPath = Path.Join(outputDirectory, outputPath);

List<Tag> allTags = unit.allTags;
Dictionary<int, int> IDToIndex = unit.IDToIndex;
Expand Down

0 comments on commit 32a8f67

Please sign in to comment.