mirror of
https://github.com/python/cpython.git
synced 2025-01-19 06:54:52 +08:00
Make the "path math" more robust, and support both relative and
absolute paths as input.
This commit is contained in:
parent
1eb41e22ab
commit
d4956aac96
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user