summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2021-05-04 12:35:18 +0200
committerRichard Hughes <richard@hughsie.com>2021-05-04 11:56:28 +0100
commit462dcd2b74dbeec45d900603320c8d9074f13cc9 (patch)
treeca0dbb9a4c40e188cc1b93c287286eb9fc17b8a1
parente2119f3e9111a3ae226f645a09ed6a80fa76830c (diff)
downloadappstream-glib-462dcd2b74dbeec45d900603320c8d9074f13cc9.tar.gz
builder: make directories as 0755 && umask
Ideally only libappstream-builder would be fixed, but asb_utils_ensure_exists is (transitively) called from builder too, so fixing also that. Fixes: #399 Merges: #400
-rw-r--r--libappstream-builder/asb-utils.c2
-rw-r--r--libappstream-glib/as-icon.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c
index c5f49cd..d1ee2ad 100644
--- a/libappstream-builder/asb-utils.c
+++ b/libappstream-builder/asb-utils.c
@@ -99,7 +99,7 @@ asb_utils_ensure_exists (const gchar *directory, GError **error)
{
if (g_file_test (directory, G_FILE_TEST_EXISTS))
return TRUE;
- if (g_mkdir_with_parents (directory, 0700) != 0) {
+ if (g_mkdir_with_parents (directory, 0755) != 0) {
g_set_error (error,
ASB_PLUGIN_ERROR,
ASB_PLUGIN_ERROR_FAILED,
diff --git a/libappstream-glib/as-icon.c b/libappstream-glib/as-icon.c
index f1d59c7..2668f63 100644
--- a/libappstream-glib/as-icon.c
+++ b/libappstream-glib/as-icon.c
@@ -975,7 +975,7 @@ as_icon_convert_to_kind (AsIcon *icon, AsIconKind kind, GError **error)
/* ensure the parent path exists */
size_str = g_strdup_printf ("%ux%u", priv->width, priv->height);
path = g_build_filename (priv->prefix, size_str, NULL);
- if (g_mkdir_with_parents (path, 0700) != 0) {
+ if (g_mkdir_with_parents (path, 0755) != 0) {
g_set_error (error,
AS_ICON_ERROR,
AS_ICON_ERROR_FAILED,