summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsystem-file-utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index cc7fa98..31e7331 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -279,6 +279,12 @@ gs_file_create (GFile *file,
_set_error_from_errno (error);
goto out;
}
+
+ if (fchmod (fd, mode) < 0)
+ {
+ _set_error_from_errno (error);
+ goto out;
+ }
ret_stream = g_unix_output_stream_new (fd, TRUE);