core: Fix regression when committing symlinks in archive mode

Commit 802959f398 broke this because it
made all archived content files be S_IFREG, which is clearly wrong.
This commit is contained in:
Colin Walters committed 2012-02-24 10:05:26 -05:00
1 parent f14ea4b2bf
commit 16c0cfe9b5
2 files changed
+6 -2

No files matched your search

+4 -1
View File
@@ -684,9 +684,12 @@ ostree_create_file_from_input (GFile *dest_file,
if (g_cancellable_set_error_if_cancelled (cancellable, error))
return FALSE;
if (finfo != NULL && !is_archived_content)
if (finfo != NULL)
{
mode = g_file_info_get_attribute_uint32 (finfo, "unix::mode");
/* Archived content files should always be 0644 */
if (is_archived_content)
mode = (mode & S_IFMT) | 0644;
}
else
{