diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-14 10:34:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-14 10:34:04 +0000 |
commit | f9ce74c5675bdf100036d2237131ccaf7c69f61f (patch) | |
tree | fd0d473b8dc7f7baf32fa914e52483a3399e9dea /src/util | |
parent | 91bca4aa6c7559eb7ec09a0e5bcf30448e39f080 (diff) | |
download | gnunet-f9ce74c5675bdf100036d2237131ccaf7c69f61f.tar.gz gnunet-f9ce74c5675bdf100036d2237131ccaf7c69f61f.zip |
fix for 0002797
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/os_installation.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index e35f86c3e..d500580bf 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -490,27 +490,27 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
490 | execpath[--n] = '\0'; | 490 | execpath[--n] = '\0'; |
491 | 491 | ||
492 | isbasedir = 1; | 492 | isbasedir = 1; |
493 | if ((n > 5) && | 493 | if ((n > 6) && |
494 | ((0 == strcasecmp (&execpath[n - 5], "lib32")) || | 494 | ((0 == strcasecmp (&execpath[n - 6], "/lib32")) || |
495 | (0 == strcasecmp (&execpath[n - 5], "lib64")))) | 495 | (0 == strcasecmp (&execpath[n - 6], "/lib64")))) |
496 | { | 496 | { |
497 | if ( (GNUNET_OS_IPK_LIBDIR != dirkind) && | 497 | if ( (GNUNET_OS_IPK_LIBDIR != dirkind) && |
498 | (GNUNET_OS_IPK_LIBEXECDIR != dirkind) ) | 498 | (GNUNET_OS_IPK_LIBEXECDIR != dirkind) ) |
499 | { | 499 | { |
500 | /* strip '/lib32' or '/lib64' */ | 500 | /* strip '/lib32' or '/lib64' */ |
501 | execpath[n - 5] = '\0'; | 501 | execpath[n - 6] = '\0'; |
502 | n -= 5; | 502 | n -= 6; |
503 | } | 503 | } |
504 | else | 504 | else |
505 | isbasedir = 0; | 505 | isbasedir = 0; |
506 | } | 506 | } |
507 | else if ((n > 3) && | 507 | else if ((n > 4) && |
508 | ((0 == strcasecmp (&execpath[n - 3], "bin")) || | 508 | ((0 == strcasecmp (&execpath[n - 4], "/bin")) || |
509 | (0 == strcasecmp (&execpath[n - 3], "lib")))) | 509 | (0 == strcasecmp (&execpath[n - 4], "/lib")))) |
510 | { | 510 | { |
511 | /* strip '/bin' or '/lib' */ | 511 | /* strip '/bin' or '/lib' */ |
512 | execpath[n - 3] = '\0'; | 512 | execpath[n - 4] = '\0'; |
513 | n -= 3; | 513 | n -= 4; |
514 | } | 514 | } |
515 | /* in case this was a directory named foo-bin, remove "foo-" */ | 515 | /* in case this was a directory named foo-bin, remove "foo-" */ |
516 | while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR)) | 516 | while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR)) |