[gjs/gnome-3-28] importer: Retrieve names while iterating search path



commit 544c9f47215463e635db9436ba1f7c8afa4b919b
Author: Ole Jørgen Brønner <olejorgenb yahoo no>
Date:   Fri May 11 22:27:15 2018 -0700

    importer: Retrieve names while iterating search path
    
    Previously, only the file type was requested. Even though the name was
    not requested, query_info still returns the file name for non-symlink
    files, so this bug went unnoticed in most cases. However, when there was
    a symlink in the search path this broke.
    
    Closes: #154

 gjs/importer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index b4ea3c82..4c42a845 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -706,7 +706,7 @@ importer_enumerate(JSContext        *context,
         /* new_for_commandline_arg handles resource:/// paths */
         GjsAutoUnref<GFile> dir = g_file_new_for_commandline_arg(dirname);
         GjsAutoUnref<GFileEnumerator> direnum =
-            g_file_enumerate_children(dir, G_FILE_ATTRIBUTE_STANDARD_TYPE,
+            g_file_enumerate_children(dir, "standard::name,standard::type",
                                       G_FILE_QUERY_INFO_NONE, NULL, NULL);
 
         while (true) {


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