summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornixo <nicolo@nixo.xyz>2019-12-20 11:45:11 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-12-22 10:07:29 +0100
commit6315e1e76087a013198bfc33f0ec6a444cf5e662 (patch)
treef3da9ddbc79270ef846917b225ce7f177b572529
parent04d2828ad9561d58f5f34ae99e706129b468f805 (diff)
downloadorg-mode-6315e1e76087a013198bfc33f0ec6a444cf5e662.tar.gz
ox-odt: Get write permissions on styles.xml
* lisp/ox-odt.el (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
-rw-r--r--lisp/ox-odt.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index f9c4a93..1ffdf31 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