mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 19:37:58 +00:00
(file-truename): Don't raise args-out-of-range error
when filename has no separator on windows-nt. (Bug#982)
This commit is contained in:
parent
4e822bdc11
commit
35e3abe55c
2 changed files with 11 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2008-09-15 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* files.el (file-truename): Don't raise args-out-of-range error
|
||||
when filename has no separator on windows-nt. (Bug#982)
|
||||
|
||||
2008-09-14 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* diff-mode.el (diff-find-file-name): Rename `batch' to `noprompt' and
|
||||
|
|
|
|||
|
|
@ -856,10 +856,14 @@ containing it, until no links are left at any level.
|
|||
missing rest)
|
||||
(if longname
|
||||
(setq filename longname)
|
||||
;; include the preceding directory separator in the missing
|
||||
;; Include the preceding directory separator in the missing
|
||||
;; part so subsequent recursion on the rest works.
|
||||
(setq missing (concat "/" (file-name-nondirectory filename)))
|
||||
(setq rest (substring filename 0 (* -1 (length missing))))
|
||||
(let ((length (length missing)))
|
||||
(setq rest
|
||||
(if (> length (length filename))
|
||||
""
|
||||
(substring filename 0 (- length)))))
|
||||
(setq filename (concat (file-truename rest) missing))))))
|
||||
(setq done t)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue