core: Further fix fallout from archive mode files

Continuing from 16c0cfe9b5, we now have
the problem that we're removing the executable bit, which obviously
breaks things when we chroot in for a build.  Fix this by masking over
our bits.
This commit is contained in:
Colin Walters 2012-02-24 17:50:44 -05:00
parent 0e5919bde1
commit 5329f1706b
1 changed files with 5 additions and 2 deletions

View File

@ -687,9 +687,12 @@ ostree_create_file_from_input (GFile *dest_file,
if (finfo != NULL) if (finfo != NULL)
{ {
mode = g_file_info_get_attribute_uint32 (finfo, "unix::mode"); mode = g_file_info_get_attribute_uint32 (finfo, "unix::mode");
/* Archived content files should always be 0644 */ /* Archived content files should always be readable by all and
* read/write by owner. If the base file is executable then
* we're also executable.
*/
if (is_archived_content) if (is_archived_content)
mode = (mode & S_IFMT) | 0644; mode |= 0644;
} }
else else
{ {