export: Always make directories accessible

There is no reason ever to make a flatpak with a
directory that is not accessible, so make them all
readable and executable.
tingping/wmclass
Alexander Larsson 2017-04-24 15:51:56 +02:00
parent fa996e704b
commit dddb4a2e44
1 changed files with 5 additions and 1 deletions

View File

@ -172,7 +172,11 @@ commit_filter (OstreeRepo *repo,
/* No setuid */
mode = mode & ~07000;
/* Canonical permission mode == same as what bare-user mode uses for checkouts */
mode = mode | 0744;
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_REGULAR)
mode = mode | 0744;
/* Always make directories readable and executable */
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY)
mode = mode | 0555;
g_file_info_set_attribute_uint32 (file_info, "unix::mode", mode);
if (matches_patterns (commit_data->exclude, path) &&