aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-09 09:05:27 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-09 09:05:27 +0000
commitbde45c2b3e2f0cced9a068ba6327a65ac37fb19a (patch)
treef48567aa186bed81db30fa79e252b9988f63ba15 /src/main.c
parent07f89648745214c31b2670d6a261f77ac6fa286f (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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index e5adf542..0d9ef0b4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();