diff options
author | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-10-18 21:39:49 +0000 |
---|---|---|
committer | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-10-18 21:39:49 +0000 |
commit | 1b2af6b6c04ee890a75487bcc925d2dcd5704b3b (patch) | |
tree | 5953a9fc5657d24fbfa0d8f72526d61a4bd86940 | |
parent | c74a87960ea77ee8e9b323cfa333e6ca96a9d8b6 (diff) | |
download | navit-1b2af6b6c04ee890a75487bcc925d2dcd5704b3b.tar.gz |
Fix:wordexp: Undoes Revision 3588. With pathlen -1, navit ignores the trailing slash in Win32 / CE's maps and bookmarks folder - making them useless. Please consult Number6 before undoing this revision
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3610 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/support/wordexp/glob.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/navit/support/wordexp/glob.c b/navit/support/wordexp/glob.c index 8f3d5d1db..08a3c999f 100644 --- a/navit/support/wordexp/glob.c +++ b/navit/support/wordexp/glob.c @@ -84,7 +84,10 @@ int glob(const char *pattern, int flags, #endif pglob->gl_pathv[pglob->gl_pathc - 1] = malloc ((pathlen + strlen (filename) + 1) * sizeof(char*)); strncpy (pglob->gl_pathv[pglob->gl_pathc - 1], pattern, pathlen); - strcpy (pglob->gl_pathv[pglob->gl_pathc - 1] + pathlen - 1, filename); + // strcpy (pglob->gl_pathv[pglob->gl_pathc - 1] + pathlen - 1, filename); + // The above line should be uncommented later. Currently, the blow line needs to be in use. + // If not, navit on WinCE / Win32 cannot "find" the maps and bookmarks folder + strcpy (pglob->gl_pathv[pglob->gl_pathc - 1] + pathlen, filename); } while (FindNextFile (hFiles, &xFindData)); FindClose(hFiles); |