diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-13 11:23:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-13 11:23:22 +0000 |
commit | 16f659aedbacb16d2861ac08b832d2336e583117 (patch) | |
tree | 1695215287d5ba136bd6c4ea47c2623f1356f890 /src/util/os_installation.c | |
parent | ec56f91ac361b2a95d78e7529ed60549b7e9ddf3 (diff) | |
download | gnunet-16f659aedbacb16d2861ac08b832d2336e583117.tar.gz gnunet-16f659aedbacb16d2861ac08b832d2336e583117.zip |
-LRN: fix r21946 to work on W32
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r-- | src/util/os_installation.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index e42986173..c44f741f4 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -216,8 +216,13 @@ get_path_from_PATH (const char *binary) | |||
216 | p = getenv ("PATH"); | 216 | p = getenv ("PATH"); |
217 | if (NULL == p) | 217 | if (NULL == p) |
218 | return NULL; | 218 | return NULL; |
219 | #if WINDOWS | ||
220 | /* On W32 look in CWD first. */ | ||
221 | GNUNET_asprintf (&path, ".%c%s", PATH_SEPARATOR, p); | ||
222 | #else | ||
219 | path = GNUNET_strdup (p); /* because we write on it */ | 223 | path = GNUNET_strdup (p); /* because we write on it */ |
220 | buf = GNUNET_malloc (strlen (path) + 20); | 224 | #endif |
225 | buf = GNUNET_malloc (strlen (path) + strlen (binary) + 1 + 1); | ||
221 | pos = path; | 226 | pos = path; |
222 | while (NULL != (end = strchr (pos, PATH_SEPARATOR))) | 227 | while (NULL != (end = strchr (pos, PATH_SEPARATOR))) |
223 | { | 228 | { |