diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2018-01-15 23:06:34 +0100 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2018-01-15 23:06:34 +0100 |
commit | d05f1ae5a2c9a058323e0524075b5039c3ec1a88 (patch) | |
tree | 8d16db863f372e3448fbeb12818b01073a1af47d | |
parent | 7d14b6a2aa649e2213348883893a24a6a6083cb9 (diff) |
Fix permissions for files *and* directories
-rw-r--r-- | nov.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -145,18 +145,18 @@ Each alist item consists of the identifier and full path.") (rename-file item directory)) (delete-directory child)) -(defun nov--fix-permissions (file-or-directory) +(defun nov--fix-permissions (file-or-directory mode) (->> (file-modes file-or-directory) - (file-modes-symbolic-to-number "+r") + (file-modes-symbolic-to-number mode) (set-file-modes file-or-directory))) (defun nov-fix-permissions (directory) "Iterate recursively through DIRECTORY to fix its files." - (nov--fix-permissions directory) + (nov--fix-permissions directory "+rx") (dolist (file (nov-directory-files directory)) (if (file-directory-p file) (nov-fix-permissions file) - (nov--fix-permissions file)))) + (nov--fix-permissions file "+r")))) (defun nov-unzip-epub (directory filename) "Extract FILENAME into DIRECTORY. |