From c32996bd3d7568e6b5f44850b45d132861f59b2f Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 7 Feb 2006 07:56:08 +0000 Subject: [PATCH] Use encoded logbook name for comparison SVN revision: 1651 --- src/elogd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index ff3e5d74..9b8d1396 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6220,8 +6220,8 @@ void set_location(LOGBOOK * lbs, char *rel_path) *strchr(str, '?') = 0; /* strip rightmost '/' */ - if (strrchr(str, '/')) - *strrchr(str, '/') = 0; + if (str[strlen(str)-1] == '/') + str[strlen(str)-1] = 0; /* extract last subdir */ p = str+strlen(str); @@ -6232,7 +6232,7 @@ void set_location(LOGBOOK * lbs, char *rel_path) /* if last subdir equals any logbook name, strip it */ for (i = 0; lb_list[i].name[0]; i++) - if (stricmp(p, lb_list[i].name) == 0) { + if (stricmp(p, lb_list[i].name_enc) == 0) { *p = 0; break; }