diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2017-08-30 22:44:05 +0200 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2017-08-30 22:44:05 +0200 |
commit | 5747b9eb6ebfca4f603ed0401817132892b4b9dc (patch) | |
tree | 79f0a097860adbd16a518bc1f88ccb2b914c3e5e /nov.el | |
parent | 4406b0a998623f7077db699aa51663e60394e222 (diff) |
Strip directories in hyperlink targets
Diffstat (limited to 'nov.el')
-rw-r--r-- | nov.el | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -335,7 +335,10 @@ Each alist item consists of the identifier and full path.") (defun nov-url-filename-and-target (url) "Return a list of URL's filename and target." (setq url (url-generic-parse-url url)) - (list (url-filename url) (url-target url))) + ;; HACK: in case a directory is stripped, filenames may end up less + ;; than unique + (list (file-name-nondirectory (url-filename url)) + (url-target url))) (defun nov-insert-image (path) "Insert an image for PATH at point. |