From af4c1d7c926634b75a4b811e42d07bee5027f657 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Wed, 12 May 2021 18:51:07 +0100
Subject: [PATCH] resolve-in-sysroot: Correctly bail out if a non-directory is
 found

Previously, this would have incorrectly returned success with the
error set, breaking the usual GError invariants.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 steam-runtime-tools/resolve-in-sysroot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/steam-runtime-tools/resolve-in-sysroot.c b/steam-runtime-tools/resolve-in-sysroot.c
index f15407a1c..181ba0022 100644
--- a/steam-runtime-tools/resolve-in-sysroot.c
+++ b/steam-runtime-tools/resolve-in-sysroot.c
@@ -292,6 +292,7 @@ _srt_resolve_in_sysroot (int sysroot,
                   g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY,
                                "\"%s/%s\" is not a directory",
                                current_path->str, next);
+                  return -1;
                 }
             }
 
-- 
GitLab