emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master cf17823: Only fix up the file if it really exists


From: Lars Ingebrigtsen
Subject: [elpa] master cf17823: Only fix up the file if it really exists
Date: Mon, 24 Jun 2019 09:39:56 -0400 (EDT)

branch: master
commit cf178236ea8602e9aeda7869cbada77231745ba6
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Only fix up the file if it really exists
---
 packages/debbugs/debbugs-gnu.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index ec3fa52..dc3b353 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -2245,7 +2245,7 @@ If given a prefix, patch in the branch directory instead."
       (when target-name
        (when (string-match "^/" target-name)
          ;; This is an absolute path, so try to find the target.
-         (while (and (search "/" target-name)
+         (while (and (cl-search "/" target-name)
                      (not (file-exists-p (expand-file-name target-name dir))))
            (setq target-name (replace-regexp-in-string "^[^/]*/" ""
                                                        target-name))))
@@ -2255,19 +2255,19 @@ If given a prefix, patch in the branch directory 
instead."
                       (not (file-exists-p
                             (expand-file-name (substring target-name 2)
                                               dir))))
-                 (file-exists-p (expand-file-name target-name dir))))
-       ;; We have a simple patch that refers to a file somewhere in the
-       ;; tree.  Find it.
-       (when-let ((files (directory-files-recursively
-                          dir
-                          (concat "^" (regexp-quote
-                                       (file-name-nondirectory target-name))
-                                  "$"))))
-         (when (re-search-forward "^[+]+ .*" nil t)
-           (replace-match (concat "+++ a"
-                                  (substring (car files) (length dir))
-                                  (match-string 1))
-                          nil t)))))
+                 (file-exists-p (expand-file-name target-name dir)))
+         ;; We have a simple patch that refers to a file somewhere in the
+         ;; tree.  Find it.
+         (when-let ((files (directory-files-recursively
+                            dir
+                            (concat "^" (regexp-quote
+                                         (file-name-nondirectory target-name))
+                                    "$"))))
+           (when (re-search-forward "^[+]+ .*" nil t)
+             (replace-match (concat "+++ a"
+                                    (substring (car files) (length dir))
+                                    (match-string 1))
+                            nil t))))))
     (forward-line 2)))
 
 (defun debbugs-gnu-find-contributor (string)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]