[gnome-autoar/wip/oholy/various-fixes: 15/17] extractor: Do not follow symlinks when detecting conflicts




commit 806c5bcc33c67d4d1983b48a269a9713ab604902
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Mar 1 10:13:17 2021 +0100

    extractor: Do not follow symlinks when detecting conflicts
    
    Currently, symlinks are followed when detecting conflicts. But this
    is not desired as the original file caused the conflict, not its target.

 gnome-autoar/autoar-extractor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index 46e304e..1532c3e 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -966,7 +966,7 @@ autoar_extractor_check_file_conflict (GFile  *file,
   GFileType file_type;
 
   file_type = g_file_query_file_type (file,
-                                      G_FILE_QUERY_INFO_NONE,
+                                      G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
                                       NULL);
   /* If there is no file with the given name, there will be no conflict */
   if (file_type == G_FILE_TYPE_UNKNOWN) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]