[gnome-builder/wip/gtk4-port] plugins: fix various build system string comparisons



commit 0228e62be4d5334c0c2f7bab9efc53069d7bce3a
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 9 13:22:56 2022 -0700

    plugins: fix various build system string comparisons

 src/plugins/cargo/gbp-cargo-build-system.c   | 2 +-
 src/plugins/gradle/gbp-gradle-build-system.c | 2 +-
 src/plugins/maven/gbp-maven-build-system.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/cargo/gbp-cargo-build-system.c b/src/plugins/cargo/gbp-cargo-build-system.c
index 959036f32..7dc3135fe 100644
--- a/src/plugins/cargo/gbp-cargo-build-system.c
+++ b/src/plugins/cargo/gbp-cargo-build-system.c
@@ -165,7 +165,7 @@ gbp_cargo_build_system_get_project_dir (GbpCargoBuildSystem *self)
 
   base = g_file_get_basename (self->project_file);
 
-  if (strcasecmp (base, "Cargo.toml") != 0)
+  if (strcasecmp (base, "Cargo.toml") == 0)
     {
       g_autoptr(GFile) parent = g_file_get_parent (self->project_file);
       return g_file_get_path (parent);
diff --git a/src/plugins/gradle/gbp-gradle-build-system.c b/src/plugins/gradle/gbp-gradle-build-system.c
index 60d7c6bb3..bdbc61de7 100644
--- a/src/plugins/gradle/gbp-gradle-build-system.c
+++ b/src/plugins/gradle/gbp-gradle-build-system.c
@@ -156,7 +156,7 @@ gbp_gradle_build_system_get_project_dir (GbpGradleBuildSystem *self)
 
   base = g_file_get_basename (self->project_file);
 
-  if (strcasecmp (base, "build.gradle") != 0)
+  if (strcasecmp (base, "build.gradle") == 0)
     {
       g_autoptr(GFile) parent = g_file_get_parent (self->project_file);
       return g_file_get_path (parent);
diff --git a/src/plugins/maven/gbp-maven-build-system.c b/src/plugins/maven/gbp-maven-build-system.c
index 14d2e7c4e..dd762ec1f 100644
--- a/src/plugins/maven/gbp-maven-build-system.c
+++ b/src/plugins/maven/gbp-maven-build-system.c
@@ -156,7 +156,7 @@ gbp_maven_build_system_get_project_dir (GbpMavenBuildSystem *self)
 
   base = g_file_get_basename (self->project_file);
 
-  if (strcasecmp (base, "pom.xml") != 0)
+  if (strcasecmp (base, "pom.xml") == 0)
     {
       g_autoptr(GFile) parent = g_file_get_parent (self->project_file);
       return g_file_get_path (parent);


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