From dddb4a2e447330372dd67ab4d141755a57c215ee Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 24 Apr 2017 15:51:56 +0200 Subject: [PATCH] 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. --- app/flatpak-builtins-build-export.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c index dbc8327f..965386ef 100644 --- a/app/flatpak-builtins-build-export.c +++ b/app/flatpak-builtins-build-export.c @@ -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) &&