commit 5618ef004fa350901e9b09fb9c742b6216dfc5d0
parent aac70d4d6c172d5a82ea106d47a8b9e24b642602
Author: wwp <subscript@free.fr>
Date: Thu, 16 Sep 2021 00:18:50 +0200
Fix CID 1491202, 1491126, 1491156 and 1491142: resource leaks. And
simplify the copy algorithm a bit (mostly around error checking).
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/common/file-utils.c b/src/common/file-utils.c
@@ -742,9 +742,9 @@ gint copy_dir(const gchar *src, const gchar *dst)
r = copy_file(old_file, new_file, TRUE);
}
#ifndef G_OS_WIN32
- /* Windows has no symlinks. Or well, Vista seems to
- have something like this but the semantics might be
- different. Thus we don't use it under Windows. */
+ /* Windows has no symlinks. Or well, Vista seems to
+ have something like this but the semantics might be
+ different. Thus we don't use it under Windows. */
else if (g_file_test(old_file, G_FILE_TEST_IS_SYMLINK)) {
GError *error = NULL;
gchar *target = g_file_read_link(old_file, &error);