filename = g_build_filename
(userdir, "user.db", NULL);
- g_unlink(filename);
+ unlink(filename);
g_free(filename);
return exists;
const char * userfilename = table_info->m_user_filename;
gchar * chunkfilename = g_build_filename(context->m_user_dir,
- userfilename, NULL);
+ userfilename, NULL);
/* check bin file exists. if not, create a new one. */
if (chunk->load(chunkfilename)) {
userfilename, NULL);
log->save(tmppathname);
rename(tmppathname, chunkpathname);
- g_free(tmppathname);
g_free(chunkpathname);
+ g_free(tmppathname);
delete log;
}
const char * userfilename = table_info->m_user_filename;
gchar * tmpfilename = g_strdup_printf("%s.tmp", userfilename);
- gchar * chunkpathname = g_build_filename(context->m_user_dir,
- userfilename, NULL);
gchar * tmppathname = g_build_filename(context->m_user_dir,
tmpfilename, NULL);
g_free(tmpfilename);
+ gchar * chunkpathname = g_build_filename(context->m_user_dir,
+ userfilename, NULL);
+
chunk->save(tmppathname);
rename(tmppathname, chunkpathname);
g_free(chunkpathname);