Fix flymake-proc--delete-temp-directory if temp dir ends in slash

Fixes: bug#34074

Reported by 林宝龙 <lbl52001@gmail.com>.

* lisp/progmodes/flymake-proc.el
 (flymake-proc--delete-temp-directory):  Use directory-file-name.
This commit is contained in:
João Távora 2019-01-17 14:38:44 +00:00
parent 54f297904e
commit 80cbfb61c5

View file

@ -887,7 +887,7 @@ can also be executed interactively independently of
(defun flymake-proc--delete-temp-directory (dir-name)
"Attempt to delete temp dir created by `flymake-proc-create-temp-with-folder-structure', do not fail on error."
(let* ((temp-dir temporary-file-directory)
(suffix (substring dir-name (1+ (length temp-dir)))))
(suffix (substring dir-name (1+ (length (directory-file-name temp-dir))))))
(while (> (length suffix) 0)
(setq suffix (directory-file-name suffix))