Code

Extension dependency-check now also finds win32 executables if ".exe" is omitted...
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 12 Sep 2006 21:57:14 +0000 (21:57 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 12 Sep 2006 21:57:14 +0000 (21:57 +0000)
src/extension/dependency.cpp

index 473c6dc6269fc7f7543d9d8e9a6c18dd9de66cd9..109d5ed1211ab76d36d225666df8bc01f4276199 100644 (file)
@@ -212,8 +212,17 @@ Dependency::check (void) const
                             g_free(orig_path);
                             return TRUE;
                         }
+                        // give it a 2nd try with ".exe" added
+                        gchar * final_name_exe = g_strdup_printf ("%s.exe", final_name);                        
+                        if (Glib::file_test(final_name_exe, filetest)) {
+                            g_free(final_name);
+                            g_free(final_name_exe);
+                            g_free(orig_path);
+                            return TRUE;
+                        }
 
                         g_free(final_name);
+                        g_free(final_name_exe);
                     }
 
                     g_free(orig_path);