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 c85dd85
Showing 1 changed file with 12 additions and 2 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

0 comments on commit c85dd85

Please sign in to comment.