diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-06-28 09:10:52 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-06-28 09:10:52 +0000 |
commit | 2f0b79bb86cafadca8900cc5f51cdec49c954c36 (patch) | |
tree | 753e5f298f44af04c9f657ade0c9166ebac7b252 /navit/main.c | |
parent | 513a1db66836931c74d67bd2e6cefd395835feba (diff) | |
download | navit-2f0b79bb86cafadca8900cc5f51cdec49c954c36.tar.gz |
Fix:Core:Strip /bin from win32 module name
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4546 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/main.c')
-rw-r--r-- | navit/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/navit/main.c b/navit/main.c index 73d68a4a0..94ae4b384 100644 --- a/navit/main.c +++ b/navit/main.c @@ -380,6 +380,7 @@ main_init(const char *program) { char filename[MAX_PATH + 1], *end; + int len; *filename = '\0'; #ifdef _UNICODE /* currently for wince */ @@ -394,6 +395,10 @@ main_init(const char *program) if(end) *end = '\0'; } + len=strlen(filename); + if (len > 4 && !strcmp(filename+len-4,"\\bin")) { + filename[len-4]='\0'; + } setenv("NAVIT_PREFIX", filename, 0); } if (!getenv("HOME")) |