X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fpkgmgrinfo_certinfo.c;h=c626b519180812690af733a6da3bf5342c72ce1a;hb=fe6aacb1830e31f38b7c95b64a8055cfc486a0ac;hp=7535c936a78fcfdbdcd84bb357c920fcd3bf0ce4;hpb=1f725b59ebec3848506d766cf043bab8515f26f7;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git diff --git a/src/pkgmgrinfo_certinfo.c b/src/pkgmgrinfo_certinfo.c index 7535c93..c626b51 100644 --- a/src/pkgmgrinfo_certinfo.c +++ b/src/pkgmgrinfo_certinfo.c @@ -603,6 +603,8 @@ API int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h ha return PMINFO_R_EINVAL; } + _check_create_cert_db(); + /* open unified global cert db */ dbpath = getUserPkgCertDBPathUID(GLOBAL_USER); if (dbpath == NULL) @@ -623,8 +625,6 @@ API int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h ha return PMINFO_R_ERROR; } - _check_create_cert_db(db); - if (_pkginfo_save_cert_index_info(db, info->cert_info)) { _LOGE("failed to save cert index info, rollback now"); sqlite3_exec(GET_DB(cert_db), "ROLLBACK", NULL, NULL, NULL);