diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-21 19:12:57 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-21 19:12:57 +0000 |
commit | dfca2f848dad860c1a56192234cd0473a7e2af0c (patch) | |
tree | 67662bbe4430eccca494137ea94673a93cdfec45 /navit/log.c | |
parent | 81fc786403930c83540652f04edcd36a081992a7 (diff) | |
download | navit-dfca2f848dad860c1a56192234cd0473a7e2af0c.tar.gz |
Fix:Core:Correct handling of %i for android
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2782 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/log.c')
-rw-r--r-- | navit/log.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/navit/log.c b/navit/log.c index b12d2ba07..320b3aee2 100644 --- a/navit/log.c +++ b/navit/log.c @@ -73,17 +73,23 @@ strftime_localtime(char *buffer, int size, char *fmt) static void expand_filenames(struct log *this_) { - char buffer[4096]; + char *pos,buffer[4096]; int i; strftime_localtime(buffer, 4096, this_->filename); this_->filename_ex1=g_strdup(buffer); - if (strstr(this_->filename_ex1,"%i")) { + if ((pos=strstr(this_->filename_ex1,"%i"))) { +#ifdef HAVE_API_ANDROID + *pos[1]='d'; +#endif i=0; do { g_free(this_->filename_ex2); this_->filename_ex2=g_strdup_printf(this_->filename_ex1,i++); } while (file_exists(this_->filename_ex2)); +#ifdef HAVE_API_ANDROID + *pos[1]='i'; +#endif } else this_->filename_ex2=g_strdup(this_->filename_ex1); } |