mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
deltas: Fix regression in ostree_repo_static_delta_execute_offline
xdg-app passed this a filename directly, and in this case it should be used as is. This regressed to always look for "superblock" in the same directory as the passed in filename. https://bugzilla.gnome.org/show_bug.cgi?id=762617
This commit is contained in:
parent
ed7266b10a
commit
1833142b14
@ -240,6 +240,7 @@ ostree_repo_static_delta_execute_offline (OstreeRepo *self,
|
||||
g_autoptr(GVariant) fallback = NULL;
|
||||
g_autofree char *to_checksum = NULL;
|
||||
g_autofree char *from_checksum = NULL;
|
||||
g_autofree char *basename = NULL;
|
||||
|
||||
dir_or_file_path = gs_file_get_path_cached (dir_or_file);
|
||||
|
||||
@ -255,13 +256,16 @@ ostree_repo_static_delta_execute_offline (OstreeRepo *self,
|
||||
else
|
||||
{
|
||||
g_autofree char *dir = dirname (g_strdup (dir_or_file_path));
|
||||
basename = g_path_get_basename (dir_or_file_path);
|
||||
|
||||
if (!glnx_opendirat (AT_FDCWD, dir, TRUE, &dfd, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
else
|
||||
basename = g_strdup ("superblock");
|
||||
|
||||
meta_fd = openat (dfd, "superblock", O_RDONLY | O_CLOEXEC);
|
||||
meta_fd = openat (dfd, basename, O_RDONLY | O_CLOEXEC);
|
||||
if (meta_fd < 0)
|
||||
{
|
||||
glnx_set_error_from_errno (error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user