mirror of
https://github.com/ostreedev/ostree.git
synced 2025-08-24 09:49:23 +03:00
mtree: Load traversed subdirs when creating parents
I'm working on enhancing the ostree-rs-ext test suite and I hit a bug where walking a mtree and creating a parent would fail to load lazy intermediate directories, e.g.: / -> usr -> bin If we walked we'd load `/` but keep `usr` lazy, and then invalidation would crash because it wasn't loaded. If we're going to mutate a subdir, we need to have all the parents loaded. I know this is missing tests, but...it's a bit tedious to do with the existing C tests. Eventually soon we'll execute on merging all 3 repos, and better share test suites.
This commit is contained in:
@ -477,6 +477,9 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
subdir = next;
|
subdir = next;
|
||||||
|
g_assert (subdir);
|
||||||
|
if (!_ostree_mutable_tree_make_whole (subdir, NULL, error))
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (out_parent)
|
if (out_parent)
|
||||||
|
Reference in New Issue
Block a user