core: Switch is_archive to an enumeration

This is in preparation for adding a third mode.
This commit is contained in:
Colin Walters committed 2011-12-08 17:05:16 -05:00
1 parent 7932811fbb
commit 30c53a967c
6 files changed
+110 -28

No files matched your search

+3 -3
View File
@@ -314,7 +314,7 @@ _ostree_repo_file_get_xattrs (OstreeRepoFile *self,
if (self->tree_metadata)
ret_xattrs = g_variant_get_child_value (self->tree_metadata, 4);
else if (ostree_repo_is_archive (self->repo))
else if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
{
local_file = _ostree_repo_file_nontree_get_local (self);
if (!ostree_parse_packed_file (local_file, NULL, &ret_xattrs, NULL, cancellable, error))
@@ -1035,7 +1035,7 @@ _ostree_repo_file_tree_query_child (OstreeRepoFile *self,
local_child = get_child_local_file (self->repo, checksum);
if (ostree_repo_is_archive (self->repo))
if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
{
if (!ostree_parse_packed_file (local_child, &ret_info, NULL, NULL, cancellable, error))
goto out;
@@ -1167,7 +1167,7 @@ ostree_repo_file_read (GFile *file,
goto out;
}
if (ostree_repo_is_archive (self->repo))
if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
{
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,