]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix flymake-proc--delete-temp-directory if temp dir ends in slash
authorJoão Távora <joaotavora@gmail.com>
Thu, 17 Jan 2019 14:38:44 +0000 (14:38 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 17 Jan 2019 14:38:44 +0000 (14:38 +0000)
Fixes: bug#34074
Reported by 林宝龙 <lbl52001@gmail.com>.

* lisp/progmodes/flymake-proc.el
 (flymake-proc--delete-temp-directory):  Use directory-file-name.

lisp/progmodes/flymake-proc.el

index 7cdbb266fe11323b322060c91797b5cd17f2d860..2d9dd047a3932456354aea20d3879f461b7d891b 100644 (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))