diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-02 08:40:46 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-02 08:40:46 +0000 |
commit | 77922721b5ab08bf4521c853b57e3fc78f67a930 (patch) | |
tree | 69645e0c5f4da6a918c5af4da98b9f2fb51bca51 | |
parent | 8bf78e2e3fed38cd4fe983dba15002a4ca6d762f (diff) |
src/compose.c: unlink compose->exteditor_file if exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@708 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/compose.c | 12 |
3 files changed, 18 insertions, 3 deletions
@@ -1,5 +1,9 @@ 2005-11-02 + * src/compose.c: unlink compose->exteditor_file if exist. + +2005-11-02 + * src/compose.c: compose_ext_editor_kill(): stop watching of child process in case something weird happened. diff --git a/ChangeLog.ja b/ChangeLog.ja index ea316848..6d452ec8 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-11-02 + * src/compose.c: compose->exteditor_file が存在すれば unlink する + ようにした。 + +2005-11-02 + * src/compose.c: compose_ext_editor_kill(): 変なことが起こった場合、 子プロセスの監視を止めるようにした。 diff --git a/src/compose.c b/src/compose.c index 562f8aea..e18e0a71 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4778,7 +4778,10 @@ static void compose_destroy(Compose *compose) if (compose->undostruct) undo_destroy(compose->undostruct); - g_free(compose->exteditor_file); + if (compose->exteditor_file) { + g_unlink(compose->exteditor_file); + g_free(compose->exteditor_file); + } for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter)) { @@ -5221,8 +5224,11 @@ static gboolean compose_ext_editor_kill(Compose *compose) } else if (compose->exteditor_tag != 0) { g_source_remove(compose->exteditor_tag); compose->exteditor_tag = 0; - g_free(compose->exteditor_file); - compose->exteditor_file = NULL; + if (compose->exteditor_file) { + g_unlink(compose->exteditor_file); + g_free(compose->exteditor_file); + compose->exteditor_file = NULL; + } compose->exteditor_pid = 0; compose_set_ext_editor_sensitive(compose, TRUE); } |