diff --git a/steam-runtime-tools/resolve-in-sysroot.c b/steam-runtime-tools/resolve-in-sysroot.c
index f15407a1cc70a732a8c747b60994f7942cd6d1fb..181ba00220baecec1f135c5718f67184f7d404a7 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;
                 }
             }