summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-static-delta-core.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-08-31 17:00:39 +0200
committerAlexander Larsson <alexl@redhat.com>2020-09-11 11:45:24 +0200
commit74bae256feaf297b80f0898c48ab762983b6c69a (patch)
tree935a21d493b66fd975f3435651b2f48f1fa2f0ce /src/libostree/ostree-repo-static-delta-core.c
parent69282a3dd3ef6a05339b31d46c095adfab92c4c1 (diff)
downloadostree-74bae256feaf297b80f0898c48ab762983b6c69a.tar.gz
list-deltas: Don't break on non-subdir entries
ostree_repo_list_static_delta_names() tried to validate that any second-level directory element was a directory, but there was a cut-and-paste issue, and it used `dent->d_type` instead of `sub_dent->d_type`. This fixes the code, but all old ostree versions will break if there are non-directories in a subdirectory of the deltas directory in the repo, so be wary.
Diffstat (limited to 'src/libostree/ostree-repo-static-delta-core.c')
-rw-r--r--src/libostree/ostree-repo-static-delta-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c
index ade4e9df..d12bf439 100644
--- a/src/libostree/ostree-repo-static-delta-core.c
+++ b/src/libostree/ostree-repo-static-delta-core.c
@@ -109,7 +109,7 @@ ostree_repo_list_static_delta_names (OstreeRepo *self,
return FALSE;
if (sub_dent == NULL)
break;
- if (dent->d_type != DT_DIR)
+ if (sub_dent->d_type != DT_DIR)
continue;
const char *name1 = dent->d_name;