]> granicus.if.org Git - python/commitdiff
Make the "path math" more robust, and support both relative and
authorFred Drake <fdrake@acm.org>
Sun, 28 Sep 2003 03:10:09 +0000 (03:10 +0000)
committerFred Drake <fdrake@acm.org>
Sun, 28 Sep 2003 03:10:09 +0000 (03:10 +0000)
absolute paths as input.

Doc/tools/py2texi.el

index b117cad174416453566abce784400dd911220a70..b7155acca814c2616591fb60e5b762daae219299 100644 (file)
@@ -569,9 +569,13 @@ Do not include .ind files."
                          (string-match "\\.ind\\.tex$" filename)))
       (setq dirs py2texi-dirs)
       (while (and (not includefile) dirs)
-       (setq includefile (concat path (car dirs) filename))
+       (setq includefile
+              (concat (file-name-as-directory (car dirs)) filename))
+        (if (not (file-name-absolute-p includefile))
+            (setq includefile
+                  (concat (file-name-as-directory path) includefile)))
        (unless (file-exists-p includefile)
-         (setq includefile nil)
+          (setq includefile nil)
          (setq dirs (cdr dirs))))
       (if includefile
          (save-restriction