commit: Fix reading xattrs from OstreeRepoFile:s
When doing commit --tree=ref=XXX while at the same time applying some form of modifier, ostree dies trying to read the xattrs using the raw syscalls. We fix this by falling back to ostree_repo_file_get_xattrs() in this case. Also adds a testcase for this. Closes: #577 Approved by: cgwalters
This commit is contained in:
1 parent
814aa96825
commit
bd45e7ac19
2 files changed
+13
-2
No files matched your search
@@ -2281,7 +2281,15 @@ get_modified_xattrs (OstreeRepo *self,
|
||||
}
|
||||
else if (!(modifier && (modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS) > 0))
|
||||
{
|
||||
if (path)
|
||||
if (path && OSTREE_IS_REPO_FILE (path))
|
||||
{
|
||||
if (!ostree_repo_file_get_xattrs (OSTREE_REPO_FILE (path),
|
||||
&ret_xattrs,
|
||||
cancellable,
|
||||
error))
|
||||
goto out;
|
||||
}
|
||||
else if (path)
|
||||
{
|
||||
if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (path),
|
||||
&ret_xattrs, cancellable, error))
|
||||
|
||||
Reference in new issue
Block a user