Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2022-02-21 11:38:59 +0300
committerLukáš Hrázký <lukkash@email.cz>2022-02-23 17:16:16 +0300
commitace4c87a392b8c25fd7127da49516dba52d397c9 (patch)
tree1ef7c3121fbf74887a7ad22e39b88aef0a6922b3
parentb8de5555b993d727aa16b12e29640f32dbb893d4 (diff)
Add missing return value check for `g_remove` and log fails
-rw-r--r--src/mergerepo_c.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mergerepo_c.c b/src/mergerepo_c.c
index 0e41890..34f21c9 100644
--- a/src/mergerepo_c.c
+++ b/src/mergerepo_c.c
@@ -1679,7 +1679,9 @@ dump_merged_metadata(GHashTable *merged_hashtable,
g_debug("Skip move of: %s -> %s (the destination file already exists)",
full_path, new_full_path);
g_debug("Removing: %s", full_path);
- g_remove(full_path);
+ if (g_remove(full_path) == -1) {
+ g_warning("Cannot remove %s: %s", full_path, g_strerror(errno));
+ }
g_free(full_path);
g_free(new_full_path);
continue;