Skip to content

Commit

Permalink
Use Unix path while converting INO to CPP // Issue #610
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Apr 28, 2016
1 parent f5f9421 commit 4c80a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platformio/builder/tools/piomisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def append_prototypes(contents, prototypes):
result.append("%s;" % ";\n".join([p[2] for p in prototypes]))
result.append('#line %d "%s"' % (
contents.count("\n", 0, first_pos + len(prototypes[0][2])) + 1,
prototypes[0][0]))
prototypes[0][0].replace("\\", "/")))
result.append(contents[first_pos:].strip())

return result
Expand All @@ -88,7 +88,7 @@ def convert(self):
result = ["#include <Arduino.h>"]
is_first = True
for file_path, contents in data:
result.append('#line 1 "%s"' % file_path)
result.append('#line 1 "%s"' % file_path.replace("\\", "/"))

if is_first and prototypes:
result += self.append_prototypes(contents, prototypes)
Expand Down

0 comments on commit 4c80a02

Please sign in to comment.