summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2015-08-11 00:33:21 -0500
committerDavid Tolnay <dtolnay@gmail.com>2015-08-13 09:18:44 -0700
commit66f7ce5ac331d2f4a2624834086d3e090bb7a57e (patch)
treecbcc705b8c3f5bcc3a4c920b04854371b183676c
parent3045979f6cf4952e7e3583054110dc1db95b1b01 (diff)
Make all global module paths absolute (fix #817)
This is part 1 of the fix for #817. The next commit is part 2.
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index a38b6c89..a257b9ff 100644
--- a/main.c
+++ b/main.c
@@ -232,12 +232,12 @@ int main(int argc, char* argv[]) {
if (jv_get_kind(lib_search_paths) == JV_KIND_NULL)
lib_search_paths = jv_array();
if (argv[i][2] != 0) { // -Lname (faster check than strlen)
- lib_search_paths = jv_array_append(lib_search_paths, jv_string(argv[i]+2));
+ lib_search_paths = jv_array_append(lib_search_paths, jq_realpath(jv_string(argv[i]+2)));
} else if (i >= argc - 1) {
fprintf(stderr, "-L takes a parameter: (e.g. -L /search/path or -L/search/path)\n");
die();
} else {
- lib_search_paths = jv_array_append(lib_search_paths, jv_string(argv[i+1]));
+ lib_search_paths = jv_array_append(lib_search_paths, jq_realpath(jv_string(argv[i+1])));
i++;
}
continue;