Skip to content

Commit

Permalink
wip test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarmtemp committed Jun 19, 2024
1 parent 452c61b commit edaefda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions src/libostree/ostree-repo-static-delta-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,20 @@ ostree_repo_static_delta_execute_offline_with_signature (OstreeRepo *self, GFile
if (dfd < 0)
{
if (errno != ENOTDIR)
return glnx_throw_errno_prefix (error, "openat(O_DIRECTORY)");
{
return glnx_throw_errno_prefix (error, "openat(O_DIRECTORY)");
}
else
{
g_autofree char *dir = g_path_get_dirname (dir_or_file_path);
g_autofree char *dir = "";
if (dir_or_file_path[strlen (dir_or_file_path) - 1] == G_DIR_SEPARATOR)
{
g_autofree char *modifed_dir = g_strdup (dir_or_file_path);
modifed_dir[strlen (modifed_dir) - 1] = '\0';
dir = g_path_get_dirname (modifed_dir);
}
else
dir = g_path_get_dirname (dir_or_file_path);
basename = g_path_get_basename (dir_or_file_path);

if (!glnx_opendirat (AT_FDCWD, dir, TRUE, &dfd, error))
Expand Down
2 changes: 1 addition & 1 deletion src/switchroot/ostree-prepare-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ main (int argc, char *argv[])

g_autofree char *ovl_options
= g_strdup_printf ("lowerdir=%s,upperdir=%s,workdir=%s", lowerdir, upperdir, workdir);
if (mount ("overlay", TMP_SYSROOT "/etc", "overlay", MS_SILENT, ovl_options) < 0)
if (mount ("overlay", "overlay", TMP_SYSROOT "/etc", "overlay", MS_SILENT, ovl_options) < 0)
err (EXIT_FAILURE, "failed to mount transient etc overlayfs");
}
else
Expand Down

0 comments on commit edaefda

Please sign in to comment.