[gnome-builder/wip/slaf/beautifier: 10/15] beautifier plugin: check before delete tmp files
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/slaf/beautifier: 10/15] beautifier plugin: check before delete tmp files
- Date: Mon, 5 Dec 2016 00:01:51 +0000 (UTC)
commit b5d6de025651bfa9b643a9658ff86af15e57793d
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Dec 4 00:36:46 2016 +0100
beautifier plugin: check before delete tmp files
plugins/beautifier/gb-beautifier-process.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-process.c b/plugins/beautifier/gb-beautifier-process.c
index 6f268c5..697efc6 100644
--- a/plugins/beautifier/gb-beautifier-process.c
+++ b/plugins/beautifier/gb-beautifier-process.c
@@ -58,9 +58,12 @@ process_state_free (gpointer data)
g_clear_object (&state->src_file);
g_clear_object (&state->config_file);
- g_file_delete (state->tmp_config_file, NULL, NULL);
- g_file_delete (state->tmp_src_file, NULL, NULL);
- g_file_delete (state->tmp_workdir_file, NULL, NULL);
+ if (state->tmp_config_file != NULL)
+ g_file_delete (state->tmp_config_file, NULL, NULL);
+ if (state->tmp_src_file != NULL)
+ g_file_delete (state->tmp_src_file, NULL, NULL);
+ if (state->tmp_workdir_file != NULL)
+ g_file_delete (state->tmp_workdir_file, NULL, NULL);
g_clear_object (&state->tmp_workdir_file);
g_clear_object (&state->tmp_config_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]