diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2017-09-10 00:44:34 +0200 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2017-09-10 01:24:01 +0200 |
commit | 5f501ddb68dd234baf2e26e99df7d9e2defb25d3 (patch) | |
tree | b198a62dbf60fc16ad7952738b9891d63df4ca9d /nov.el | |
parent | 00099db9c6383929e678df21b52b1be571c012dc (diff) |
Make unreadable files readable again
Diffstat (limited to 'nov.el')
-rw-r--r-- | nov.el | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -146,6 +146,10 @@ Unnecessary nesting is removed with `nov-unnest-directory'." (defun nov-slurp (filename) "Return the contents of FILENAME." + ;; HACK: unzip preserves file permissions, no matter how silly they + ;; are, so ensure files are readable + (when (not (file-readable-p filename)) + (set-file-modes filename #o444)) (with-temp-buffer (insert-file-contents filename) (buffer-string))) |