Fix regexp searching

This commit is contained in:
2025-10-26 10:42:56 -07:00
parent 4a3ef4e8f6
commit 92ede0c5d9

View File

@ -213,8 +213,10 @@ The following suffixes are recognized (in additon to \"B\"):
case-insensitive) case-insensitive)
"Compare TRASHINFO's name or path to FILTER using the provided matching "Compare TRASHINFO's name or path to FILTER using the provided matching
options." options."
(let* ((orig-path (trashinfo-original-path trashinfo)) (let* ((orig-path (trashinfo-original-path trashinfo :resolve t))
(target (if full-path orig-path (file-or-dir-namestring orig-path)))) (target (if full-path
(uiop:native-namestring orig-path)
(file-or-dir-namestring orig-path))))
(cond (cond
((and exact case-insensitive) (equalp target filter)) ((and exact case-insensitive) (equalp target filter))
(exact (equal target filter)) (exact (equal target filter))
@ -223,8 +225,10 @@ options."
(declaim (inline compare-trashinfo-to-scanner)) (declaim (inline compare-trashinfo-to-scanner))
(defun compare-trashinfo-to-scanner (trashinfo filter full-path exact) (defun compare-trashinfo-to-scanner (trashinfo filter full-path exact)
"Compare TRASHINFO's name or path to FILTER, which is a cl-ppcre scanner." "Compare TRASHINFO's name or path to FILTER, which is a cl-ppcre scanner."
(let* ((orig-path (trashinfo-original-path trashinfo)) (let* ((orig-path (trashinfo-original-path trashinfo :resolve t))
(target (if full-path orig-path (file-or-dir-namestring orig-path)))) (target (if full-path
(uiop:native-namestring orig-path)
(file-or-dir-namestring orig-path))))
(multiple-value-bind (start end) (cl-ppcre:scan filter target) (multiple-value-bind (start end) (cl-ppcre:scan filter target)
(and start (and start
(or (not exact) (or (not exact)