[gimp] Bug 754227 - scripts path doesnt search in subfolders



commit cd3843482f48f6d781f3c6168e54ec72e0b8ec81
Author: Michael Natterer <mitch gimp org>
Date:   Sun Aug 30 23:34:41 2015 +0200

    Bug 754227 - scripts path doesnt search in subfolders
    
    script_fu_load_directory(): load scripts recursively.

 plug-ins/script-fu/script-fu-scripts.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/script-fu/script-fu-scripts.c b/plug-ins/script-fu/script-fu-scripts.c
index 28f639a..b4b0e2e 100644
--- a/plug-ins/script-fu/script-fu-scripts.c
+++ b/plug-ins/script-fu/script-fu-scripts.c
@@ -609,12 +609,16 @@ script_fu_load_directory (GFile *directory)
         {
           GFileType file_type = g_file_info_get_file_type (info);
 
-         if (file_type == G_FILE_TYPE_REGULAR &&
-             ! g_file_info_get_is_hidden (info))
+          if ((file_type == G_FILE_TYPE_REGULAR ||
+               file_type == G_FILE_TYPE_DIRECTORY) &&
+              ! g_file_info_get_is_hidden (info))
             {
               GFile *child = g_file_enumerator_get_child (enumerator, info);
 
-              script_fu_load_script (child);
+              if (file_type == G_FILE_TYPE_DIRECTORY)
+                script_fu_load_directory (child);
+              else
+                script_fu_load_script (child);
 
               g_object_unref (child);
             }


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