[ostree] deltas: Fix regression in ostree_repo_static_delta_execute_offline
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deltas: Fix regression in ostree_repo_static_delta_execute_offline
- Date: Wed, 24 Feb 2016 14:54:23 +0000 (UTC)
commit 1833142b14255f5ddf0fd2b991a4b5aa5a6ecc92
Author: Alexander Larsson <alexl redhat com>
Date: Wed Feb 24 15:17:46 2016 +0100
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
src/libostree/ostree-repo-static-delta-core.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c
index eb6de3b..ea5842f 100644
--- a/src/libostree/ostree-repo-static-delta-core.c
+++ b/src/libostree/ostree-repo-static-delta-core.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]