mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-18 10:04:17 +03:00
commit: Give a better error message for unhandled file type
xref https://github.com/ostreedev/ostree/issues/3319 It'd be useful to know what file type is being hit here; I believe this code path should be unreachable.
This commit is contained in:
parent
a54518e4d9
commit
f11e6a4ae0
@ -3173,7 +3173,8 @@ _ostree_repo_commit_modifier_apply (OstreeRepo *self, OstreeRepoCommitModifier *
|
|||||||
if (canonicalize_perms)
|
if (canonicalize_perms)
|
||||||
{
|
{
|
||||||
guint mode = g_file_info_get_attribute_uint32 (modified_info, "unix::mode");
|
guint mode = g_file_info_get_attribute_uint32 (modified_info, "unix::mode");
|
||||||
switch (g_file_info_get_file_type (file_info))
|
GFileType ty = g_file_info_get_file_type (file_info);
|
||||||
|
switch (ty)
|
||||||
{
|
{
|
||||||
case G_FILE_TYPE_REGULAR:
|
case G_FILE_TYPE_REGULAR:
|
||||||
/* In particular, we want to squash the s{ug}id bits, but this also
|
/* In particular, we want to squash the s{ug}id bits, but this also
|
||||||
@ -3188,7 +3189,7 @@ _ostree_repo_commit_modifier_apply (OstreeRepo *self, OstreeRepoCommitModifier *
|
|||||||
case G_FILE_TYPE_SYMBOLIC_LINK:
|
case G_FILE_TYPE_SYMBOLIC_LINK:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_error ("unexpected file type %u", (unsigned)ty);
|
||||||
}
|
}
|
||||||
g_file_info_set_attribute_uint32 (modified_info, "unix::uid", 0);
|
g_file_info_set_attribute_uint32 (modified_info, "unix::uid", 0);
|
||||||
g_file_info_set_attribute_uint32 (modified_info, "unix::gid", 0);
|
g_file_info_set_attribute_uint32 (modified_info, "unix::gid", 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user