Even if a deleted font is not related to current font,
The download font service changes current font to a default font in some cases.
It is caused by using strncmp without "/" character at end of delete dir path.
ex. Current Font Path - /opt/share/fonts/org.tizen.downloadablefont1/myfont.ttf
Delete Font Path - /opt/share/fonts/org.tizen.downloadablefont
The path for comparing should have "/" at end of the path.
Change-Id: I76bbd3b06a835edb987093f4ee3226c2eb0c01ac
pkgmgrinfo_pkginfo_h handle = NULL;
const char* app_root_path = NULL;
const char *dest_path = NULL;
pkgmgrinfo_pkginfo_h handle = NULL;
const char* app_root_path = NULL;
const char *dest_path = NULL;
+ int ret, deletedir_len;
uid_t uid = 0;
elm_init(0, NULL);
uid_t uid = 0;
elm_init(0, NULL);
- sprintf(deletedir,"%s/%s", dest_path, appid);
+ /* It must contain "/" character at end of the delete dir path.
+ * It prevents file path comparing issues when there are many similar path. */
+ sprintf(deletedir,"%s/%s/", dest_path, appid);
//check if current using font is same with uninstall font
//check if current using font is same with uninstall font
- int deletedir_len = strlen(deletedir);
+ deletedir_len = strlen(deletedir);
pat = FcPatternCreate();
if (pat == NULL)
pat = FcPatternCreate();
if (pat == NULL)