diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-05 09:15:29 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-05 09:15:29 +0000 |
commit | e2a9edf210f40519169a1169801df56fcb4ef0fc (patch) | |
tree | 7f7503780992d525b6eec18f1d9a2aff89dc67f9 /src/main.c | |
parent | 3ec864159a1792df642a75611363c39fb1fd1cd3 (diff) |
added rename_force().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@470 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -212,7 +212,7 @@ int main(int argc, char *argv[]) /* backup if old rc file exists */ if (is_file_exist(RC_DIR)) { - if (rename(RC_DIR, RC_DIR ".bak") < 0) + if (rename_force(RC_DIR, RC_DIR ".bak") < 0) FILE_OP_ERROR(RC_DIR, "rename"); } @@ -258,8 +258,9 @@ int main(int argc, char *argv[]) remove_all_files(get_mime_tmp_dir()); if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log")) { - if (rename(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log", - RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0) + if (rename_force + (RC_DIR G_DIR_SEPARATOR_S "sylpheed.log", + RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0) FILE_OP_ERROR("sylpheed.log", "rename"); } set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log"); |