Commit 2e09c62b authored by Akira TAGOH's avatar Akira TAGOH

Trim the last slash

This fixes MD5 wrongly generated.
parent a563a180
...@@ -582,6 +582,7 @@ FcConfigMapFontPath(FcConfig *config, ...@@ -582,6 +582,7 @@ FcConfigMapFontPath(FcConfig *config,
FcStrList *list; FcStrList *list;
FcChar8 *dir; FcChar8 *dir;
FcChar8 *map; FcChar8 *map;
FcChar8 *retval;
list = FcConfigGetFontDirs(config); list = FcConfigGetFontDirs(config);
if (!list) if (!list)
...@@ -595,7 +596,17 @@ FcConfigMapFontPath(FcConfig *config, ...@@ -595,7 +596,17 @@ FcConfigMapFontPath(FcConfig *config,
map = FcStrPairSecond(dir); map = FcStrPairSecond(dir);
if (!map) if (!map)
return 0; return 0;
return FcStrBuildFilename(map, path + strlen((char *) dir), NULL); retval = FcStrBuildFilename(map, path + strlen((char *) dir), NULL);
if (retval)
{
size_t len = strlen ((const char *) retval);
if (retval[len-1] == '/')
{
/* trim the last slash */
retval[len-1] = 0;
}
}
return retval;
} }
FcBool FcBool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment