Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame^] | 1 | From 63bc4cd1ce2d918c6566a4e0c7d830713432fc82 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Fri, 28 Jun 2019 13:08:24 +0200 |
| 4 | Subject: [PATCH] highlight.py: correctly set permissions on file to be written |
| 5 | |
| 6 | Upstream-Status: Backport [https://github.com/GNOME/gtk-doc/commit/12d9a698fb58f3d1a840d3bfc0d15a3a9f57afc1] |
| 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 8 | --- |
| 9 | gtkdoc/highlight.py | 2 +- |
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 11 | |
| 12 | diff --git a/gtkdoc/highlight.py b/gtkdoc/highlight.py |
| 13 | index 8f6e470..82e11e8 100644 |
| 14 | --- a/gtkdoc/highlight.py |
| 15 | +++ b/gtkdoc/highlight.py |
| 16 | @@ -47,6 +47,6 @@ def highlight_code(code, lang='c'): |
| 17 | |
| 18 | |
| 19 | def append_style_defs(css_file_name): |
| 20 | - os.chmod(css_file_name, stat.S_IWRITE) |
| 21 | + os.chmod(css_file_name, 0o644) |
| 22 | with open(css_file_name, 'at', newline='\n', encoding='utf-8') as css: |
| 23 | css.write(HTML_FORMATTER.get_style_defs()) |