diff --git a/steam-runtime-tools/resolve-in-sysroot.c b/steam-runtime-tools/resolve-in-sysroot.c index c4dbb581d213483b9f20993ba2e05e7870ecbdba..181ba00220baecec1f135c5718f67184f7d404a7 100644 --- a/steam-runtime-tools/resolve-in-sysroot.c +++ b/steam-runtime-tools/resolve-in-sysroot.c @@ -281,17 +281,18 @@ _srt_resolve_in_sysroot (int sysroot, if (!glnx_fstatat (fd, "", &stat_buf, AT_EMPTY_PATH, error)) { g_prefix_error (error, - "Unable to determine whether \"%s\" " + "Unable to determine whether \"%s/%s\" " "is a directory", - current_path->str); + current_path->str, next); return -1; } if (!S_ISDIR (stat_buf.st_mode)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, - "\"%s\" is not a directory", - current_path->str); + "\"%s/%s\" is not a directory", + current_path->str, next); + return -1; } } diff --git a/steam-runtime-tools/system-info.c b/steam-runtime-tools/system-info.c index be2c172f69ff8d638355c7df6e520ca2ca3a772e..0c85ebb9daa3725678d9e2ade825a42445a08f51 100644 --- a/steam-runtime-tools/system-info.c +++ b/steam-runtime-tools/system-info.c @@ -1231,8 +1231,8 @@ ensure_overrides_cached (SrtSystemInfo *self) if (!self->overrides.have_data) { static const char * const paths[] = { - "overrides", - "usr/lib/pressure-vessel/overrides", + "overrides/", + "usr/lib/pressure-vessel/overrides/", }; g_autoptr(GError) error = NULL; g_autofree gchar *output = NULL; diff --git a/tests/pressure-vessel/resolve-in-sysroot.c b/tests/pressure-vessel/resolve-in-sysroot.c index ec6e928a9ef5f7984be554c1a6bb5833115864db..bb02827752cb12d1712b325a87f7f2d9dce6de06 100644 --- a/tests/pressure-vessel/resolve-in-sysroot.c +++ b/tests/pressure-vessel/resolve-in-sysroot.c @@ -128,11 +128,12 @@ test_resolve_in_sysroot (Fixture *f, static const ResolveTest tests[] = { { { "a/b/c/d" }, { "a/b/c/d" } }, + { { "a/b/c/d/" }, { "a/b/c/d" } }, { { "a/b/c/d", SRT_RESOLVE_FLAGS_NONE, RESOLVE_CALL_FLAGS_IGNORE_PATH }, { "a/b/c/d" }, }, - { { "a/b/c/d", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a/b/c/d" } }, + { { "a/b/c/d/", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a/b/c/d" } }, { { "a/b/c/d", SRT_RESOLVE_FLAGS_MKDIR_P, RESOLVE_CALL_FLAGS_IGNORE_PATH }, { "a/b/c/d" }, @@ -150,10 +151,19 @@ test_resolve_in_sysroot (Fixture *f, { "a/b/c/d" } }, { { "a/b/c/file", SRT_RESOLVE_FLAGS_READABLE }, { "a/b/c/file" } }, + { { "a/b/c/file/" }, { NULL, G_IO_ERROR_NOT_DIRECTORY }}, { { "a/b/c/file", SRT_RESOLVE_FLAGS_DIRECTORY }, { NULL, G_IO_ERROR_NOT_DIRECTORY } }, + { + { "a/b/c/file/", SRT_RESOLVE_FLAGS_DIRECTORY }, + { NULL, G_IO_ERROR_NOT_DIRECTORY } + }, + { + { "a/b/c/file/", SRT_RESOLVE_FLAGS_READABLE }, + { NULL, G_IO_ERROR_NOT_DIRECTORY } + }, { { "a/b/c/file", SRT_RESOLVE_FLAGS_READABLE|SRT_RESOLVE_FLAGS_DIRECTORY }, { NULL, G_IO_ERROR_NOT_DIRECTORY } @@ -161,8 +171,9 @@ test_resolve_in_sysroot (Fixture *f, { { "a/b///////.////./././///././c/d" }, { "a/b/c/d" } }, { { "/a/b///////.////././../b2////././c2/d2" }, { "a/b2/c2/d2" } }, { { "a/b/c/d/e/f" }, { NULL, G_IO_ERROR_NOT_FOUND } }, + { { "a/b/c/d/e/f/", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a/b/c/d/e/f" } }, { { "a/b/c/d/e/f", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a/b/c/d/e/f" } }, - { { "a/b/c/d/e/f" }, { "a/b/c/d/e/f" } }, + { { "a/b/c/d/e/f/" }, { "a/b/c/d/e/f" } }, { { "a/b/c/d/e/f", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a/b/c/d/e/f" } }, { { "a3/b3/c3" }, { NULL, G_IO_ERROR_NOT_FOUND } }, { { "a3/b3/c3", SRT_RESOLVE_FLAGS_MKDIR_P }, { "a3/b3/c3" } },