Skip to content

Commit

Permalink
Merge pull request #95 from Metadorius/fix/windows-path-2-the-electri…
Browse files Browse the repository at this point in the history
…c-boogaloo

Add %VAR% handling, add space before /I for clarity
  • Loading branch information
SanderMertens authored Apr 12, 2023
2 parents 70ae214 + 187db33 commit 245706c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/lang/c/src/msvc/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ void compile_src(
bake_attr *include = ut_iter_next(&it);
char* file = include->is.string;

if (file[0] == '/' || file[0] == '$' || file[0] == '\\' || (file[0] != 0 && file[1] == ':')) {
ut_strbuf_append(&cmd, " /I%s", file);
if (file[0] == '/' || file[0] == '$' || file[0] == '%' || file[0] == '\\' || (file[0] != 0 && file[1] == ':')) {
ut_strbuf_append(&cmd, " /I %s", file);
} else {
ut_strbuf_append(&cmd, " /I%s\\%s", project->path, file);
ut_strbuf_append(&cmd, " /I %s\\%s", project->path, file);
}
}
}
Expand Down

0 comments on commit 245706c

Please sign in to comment.