mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-14 20:33:48 +00:00
Use encoded logbook name for comparison
SVN revision: 1651
This commit is contained in:
parent
5cf2d03ca9
commit
c32996bd3d
@ -6220,8 +6220,8 @@ void set_location(LOGBOOK * lbs, char *rel_path)
|
|||||||
*strchr(str, '?') = 0;
|
*strchr(str, '?') = 0;
|
||||||
|
|
||||||
/* strip rightmost '/' */
|
/* strip rightmost '/' */
|
||||||
if (strrchr(str, '/'))
|
if (str[strlen(str)-1] == '/')
|
||||||
*strrchr(str, '/') = 0;
|
str[strlen(str)-1] = 0;
|
||||||
|
|
||||||
/* extract last subdir */
|
/* extract last subdir */
|
||||||
p = str+strlen(str);
|
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 */
|
/* if last subdir equals any logbook name, strip it */
|
||||||
for (i = 0; lb_list[i].name[0]; i++)
|
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;
|
*p = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user