From a80be4da6880443f2b947ade03092699fa24c846 Mon Sep 17 00:00:00 2001 From: nixo Date: Fri, 20 Dec 2019 11:45:11 +0100 Subject: [PATCH] ox-odt.el: (org-odt-template): Get write permissions on styles.xml To: emacs-orgmode@gnu.org (org-odt-template): The file `styles.xml' might be copied from a location where it is read-only. Since we need to modify it (and its copied under /tmp, so we can modify it), we need to ensure we have write persmissions on it. Set mode to 600. This is especially needed for projects like guix, where all system files are stored in a read-only location. TINYCHANGE --- lisp/ox-odt.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index f9c4a93cc..b8e228246 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -1383,6 +1383,8 @@ original parsed data. INFO is a plist holding export options." ;; create a manifest entry for styles.xml (org-odt-create-manifest-file-entry "text/xml" "styles.xml") + ;; ensure we have write permissions to this file + (set-file-modes (concat org-odt-zip-dir "styles.xml") #o600) ;; FIXME: Who is opening an empty styles.xml before this point? (with-current-buffer -- 2.24.0