1
0
Fork 0

- fixed RE in 'open-attach-window:get-extension';

- fixed bug that prevented to open an attachment from cached file.
This commit is contained in:
cage 2021-04-10 14:42:16 +02:00
parent 6786d48f6d
commit dd79fbb00c
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@
(defun get-extension (file)
(multiple-value-bind (matchedp res)
(cl-ppcre:scan-to-strings "(?i)[a-z0-9]\(\\.[^.]+)(\\?.+)$" file)
(cl-ppcre:scan-to-strings "(?i)[a-z0-9]\(\\.[^.?]+)(\\?.+)?$" file)
(when matchedp
(first-elt res))))
@ -137,4 +137,4 @@
(progn
(db:cache-invalidate url)
(open-attachment url))
(os-utils:open-resource-with-external-program url nil))))))))
(os-utils:open-resource-with-external-program cached-file nil))))))))

View File

@ -815,8 +815,8 @@
(defun link-regex->program-to-use (link)
(when-let ((found (find-if (lambda (a)
(cl-ppcre:scan (re a) link))
(config-all-link-open-program))))
(cl-ppcre:scan (re a) link))
(config-all-link-open-program))))
(values (program-name found)
(use-cache-p found))))