aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorCamil Staps2016-01-27 19:33:35 +0100
committerCamil Staps2016-01-27 19:33:35 +0100
commitdfc747cebe8cf366bf694e977aa5f591e01c9a53 (patch)
tree47c10c9a8482e51c19467c24f768c7d5f9898c24 /compile.c
parentUpdate Makefile (diff)
readline history
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/compile.c b/compile.c
index 5e8f167..71d6f11 100644
--- a/compile.c
+++ b/compile.c
@@ -65,13 +65,12 @@ int64_t compile(CleanString path, CleanString module) {
for (i=0;i<pathlength;i++)
pathchars[i] = CleanStringCharacters(path)[i];
pathchars[i] = 0x00;
-
- // cd to <path>
- chdir(pathchars);
// Build command:
- // clm -ms <module> -o <module>
- char cmd[64] = "clm -ms -nw ";
+ // cd "<path>" && clm -ms <module> -o <module>
+ char cmd[64] = "cd \"";
+ strcat(cmd, pathchars);
+ strcat(cmd, "\" && clm -ms -nw ");
strcat(cmd, modulechars);
strcat(cmd, " -o ");
strcat(cmd, modulechars);