]> code.delx.au - gnu-emacs-elpa/commitdiff
Stricter search for GTAGS file in ggtags-find-project
authorLeo Liu <sdl.web@gmail.com>
Sun, 23 Feb 2014 07:03:20 +0000 (15:03 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sun, 23 Feb 2014 07:10:30 +0000 (15:10 +0800)
to avoid being fooled by 'gtags' directory in case-insensitive file
systems.

ggtags.el

index 1383817e4085dd3be3b9cafc08ccb60b02dbc253..960feb38168b29edb67250c9724494a58517b4e1 100644 (file)
--- a/ggtags.el
+++ b/ggtags.el
@@ -330,7 +330,9 @@ properly update `ggtags-mode-map'."
                 ;; https://github.com/leoliu/ggtags/issues/22, so
                 ;; let's help it out.
                 (when-let (gtags (locate-dominating-file
-                                  default-directory "GTAGS"))
+                                  default-directory
+                                  (lambda (dir)
+                                    (file-regular-p (expand-file-name "GTAGS" dir)))))
                   (file-truename gtags))))
       (when ggtags-project-root
         (or (gethash ggtags-project-root ggtags-projects)