[gimp] app: set win32 only code between #ifdef G_OS_WIN32



commit 23245d27883ee36f9171a8b00b267bc1fe1a4dad
Author: Jehan <jehan girinstud io>
Date:   Tue Aug 19 02:12:56 2014 +0200

    app: set win32 only code between #ifdef G_OS_WIN32
    
    PATHEXT environment variable to determine whether a file is executable
    or not is a Windows-only concept.

 app/plug-in/gimppluginmanager-restore.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c
index a361ad8..50e9367 100644
--- a/app/plug-in/gimppluginmanager-restore.c
+++ b/app/plug-in/gimppluginmanager-restore.c
@@ -209,11 +209,11 @@ gimp_plug_in_manager_search (GimpPlugInManager  *manager,
   const gchar *path_str;
   GList       *path;
   GList       *list;
+
+#ifdef G_OS_WIN32
   const gchar *pathext = g_getenv ("PATHEXT");
 
-  /*  If PATHEXT is set, we are likely on Windows and need to add
-   *  the known file extensions.
-   */
+  /*  On Windows, we need to add the known file extensions in PATHEXT. */
   if (pathext)
     {
       gchar *exts;
@@ -232,6 +232,7 @@ gimp_plug_in_manager_search (GimpPlugInManager  *manager,
           g_free (exts);
         }
     }
+#endif /* G_OS_WIN32 */
 
   status_callback (_("Searching Plug-Ins"), "", 0.0);
 


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