]> git.eshelyaron.com Git - emacs.git/commitdiff
Correct last change
authorPo Lu <luangruo@yahoo.com>
Fri, 14 Jun 2024 08:42:32 +0000 (16:42 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Jun 2024 17:21:14 +0000 (19:21 +0200)
* lisp/term.el (term-generate-db-directory): Don't delete
DST-DIRECTORY if not yet existent.

(cherry picked from commit 11b145ac070217891b7ec939ce7821253887dac1)

lisp/term.el

index 80be023764081393a7cceef59a4520a5876056d7..0cfff4ef9817f2a395ffdafd4814284435f9f993 100644 (file)
@@ -1728,10 +1728,11 @@ from the same directory to a temporary location, and return the latter."
         (when (file-newer-than-file-p src-directory dst-directory)
           (message "Generating Terminfo database...")
           (with-demoted-errors "Generating Terminfo database: %s"
-            ;; Arrange that the directory be writable.
-            (dolist (x (directory-files-recursively parent "" t t))
-              (set-file-modes x #o700))
-            (delete-directory dst-directory t)
+            (when (file-exists-p dst-directory)
+              ;; Arrange that the directory be writable.
+              (dolist (x (directory-files-recursively parent "" t t))
+                (set-file-modes x #o700))
+              (delete-directory dst-directory t))
             (copy-directory src-directory dst-directory nil t t)))
         parent))))