]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid adding the empty string to the project list
authorSimen Heggestøyl <simenheg@gmail.com>
Mon, 25 May 2020 19:29:02 +0000 (21:29 +0200)
committerSimen Heggestøyl <simenheg@gmail.com>
Tue, 26 May 2020 15:42:32 +0000 (17:42 +0200)
* lisp/progmodes/project.el (project--read-project-list): Avoid adding
the empty string to the project list.

lisp/progmodes/project.el

index f00aca83d2da4f177267ee5b0c714a30b4cd188e..be0b2e4d5f51c59922e1f9ac3fde59e0a7af7e02 100644 (file)
@@ -735,9 +735,10 @@ loop using the command \\[fileloop-continue]."
       (let ((dirs (split-string (string-trim (buffer-string)) "\n"))
             (project-list '()))
         (dolist (dir dirs)
-          (cl-pushnew (file-name-as-directory dir)
-                      project-list
-                      :test #'equal))
+          (unless (string-empty-p dir)
+            (cl-pushnew (file-name-as-directory dir)
+                        project-list
+                        :test #'equal)))
         (setq project--list (reverse project-list))))))
 
 (defun project--ensure-read-project-list ()