aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-08-15 00:32:06 +0530
committerArun Isaac2022-08-15 16:38:43 +0530
commit658ec86e57ba7b1c7ac2d6ff3e38c7210cbfb399 (patch)
tree3015870fd58e26fa27a29b29e15d338001e408c5
parentf20a79207c4b6f243e6de029f5f0fffd81dc0c1c (diff)
downloadennum-658ec86e57ba7b1c7ac2d6ff3e38c7210cbfb399.tar.gz
ennum-658ec86e57ba7b1c7ac2d6ff3e38c7210cbfb399.tar.lz
ennum-658ec86e57ba7b1c7ac2d6ff3e38c7210cbfb399.zip
Return only non-directory part of poster filename.
* ennum.el (ennum-video-poster): Return only non-directory part of poster filename.
-rw-r--r--ennum.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/ennum.el b/ennum.el
index 7161eeb..040b57f 100644
--- a/ennum.el
+++ b/ennum.el
@@ -376,9 +376,10 @@ result as a string."
(_ (ennum-copy interned-file output-file)))))))
(defun ennum-video-poster (video)
- (or (seq-find (lambda (file)
- (string= (file-name-base file)
- (file-name-base video)))
+ (or (seq-some (lambda (file)
+ (and (string= (file-name-base file)
+ (file-name-base video))
+ (file-name-nondirectory file)))
(ennum-directory-files (ennum-setting :images-directory)))
(user-error "Poster for %s not found" video)))