From d05f1ae5a2c9a058323e0524075b5039c3ec1a88 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Mon, 15 Jan 2018 23:06:34 +0100 Subject: Fix permissions for files *and* directories --- nov.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nov.el b/nov.el index d78cc2b..292c9fc 100644 --- a/nov.el +++ b/nov.el @@ -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. -- cgit v1.2.3