diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-09 09:05:27 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-09 09:05:27 +0000 |
commit | bde45c2b3e2f0cced9a068ba6327a65ac37fb19a (patch) | |
tree | f48567aa186bed81db30fa79e252b9988f63ba15 /src/main.c | |
parent | 07f89648745214c31b2670d6a261f77ac6fa286f (diff) |
fix for config dir.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@484 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -256,23 +256,25 @@ int main(int argc, char *argv[]) MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir()); #endif /* G_OS_WIN32 */ + CHDIR_RETURN_VAL_IF_FAIL(get_rc_dir(), 1); + MAKE_DIR_IF_NOT_EXIST(get_imap_cache_dir()); MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir()); MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir()); MAKE_DIR_IF_NOT_EXIST(get_tmp_dir()); - MAKE_DIR_IF_NOT_EXIST(RC_DIR G_DIR_SEPARATOR_S UIDL_DIR); + MAKE_DIR_IF_NOT_EXIST(UIDL_DIR); /* remove temporary files */ remove_all_files(get_tmp_dir()); remove_all_files(get_mime_tmp_dir()); - if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log")) { - if (rename_force - (RC_DIR G_DIR_SEPARATOR_S "sylpheed.log", - RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0) + if (is_file_exist("sylpheed.log")) { + if (rename_force("sylpheed.log", "sylpheed.log.bak") < 0) FILE_OP_ERROR("sylpheed.log", "rename"); } - set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log"); + set_log_file("sylpheed.log"); + + CHDIR_RETURN_VAL_IF_FAIL(get_home_dir(), 1); prefs_common_read_config(); |