diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bbc8597270..c3c4835ad9e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-09-15 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * files.el (file-truename): Don't raise args-out-of-range error | ||
| 4 | when filename has no separator on windows-nt. (Bug#982) | ||
| 5 | |||
| 1 | 2008-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2008-09-14 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * diff-mode.el (diff-find-file-name): Rename `batch' to `noprompt' and | 8 | * diff-mode.el (diff-find-file-name): Rename `batch' to `noprompt' and |
diff --git a/lisp/files.el b/lisp/files.el index 76e50247d6f..2773c9f14b0 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -856,10 +856,14 @@ containing it, until no links are left at any level. | |||
| 856 | missing rest) | 856 | missing rest) |
| 857 | (if longname | 857 | (if longname |
| 858 | (setq filename longname) | 858 | (setq filename longname) |
| 859 | ;; include the preceding directory separator in the missing | 859 | ;; Include the preceding directory separator in the missing |
| 860 | ;; part so subsequent recursion on the rest works. | 860 | ;; part so subsequent recursion on the rest works. |
| 861 | (setq missing (concat "/" (file-name-nondirectory filename))) | 861 | (setq missing (concat "/" (file-name-nondirectory filename))) |
| 862 | (setq rest (substring filename 0 (* -1 (length missing)))) | 862 | (let ((length (length missing))) |
| 863 | (setq rest | ||
| 864 | (if (> length (length filename)) | ||
| 865 | "" | ||
| 866 | (substring filename 0 (- length))))) | ||
| 863 | (setq filename (concat (file-truename rest) missing)))))) | 867 | (setq filename (concat (file-truename rest) missing)))))) |
| 864 | (setq done t))) | 868 | (setq done t))) |
| 865 | 869 | ||