core: Fix packed file creation

We were calculating the wrong checksum, and also mistakenly
not using packed files in archive mode for non-regular files.
This commit is contained in:
Colin Walters committed 2011-12-02 17:49:57 -05:00
1 parent b5ce760678
commit 3ab69101f7
2 files changed
+23 -6

No files matched your search

+3 -5
View File
@@ -986,14 +986,12 @@ ostree_repo_store_file (OstreeRepo *self,
}
else
{
/* If we're not an archive, we just need to checksum the input,
then call link() */
if (!ostree_checksum_file (file, OSTREE_OBJECT_TYPE_FILE, &ret_checksum, cancellable, error))
goto out;
if (!link_object_trusted (self, file, g_checksum_get_string (ret_checksum),
OSTREE_OBJECT_TYPE_FILE, FALSE, did_exist,
cancellable, error))
if (!ostree_repo_store_object_trusted (self, file, g_checksum_get_string (ret_checksum),
OSTREE_OBJECT_TYPE_FILE, FALSE, did_exist,
cancellable, error))
goto out;
}