From a280b80c94e140ae0b1ae247d883d5794019e075 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 22 Feb 2002 18:38:36 +0000 Subject: [PATCH] (delete-file-with-children): New function; use it instead of "rm". --- lisp/utf-2000/make-cdbs.el | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lisp/utf-2000/make-cdbs.el b/lisp/utf-2000/make-cdbs.el index 5c455c5..2ecc050 100644 --- a/lisp/utf-2000/make-cdbs.el +++ b/lisp/utf-2000/make-cdbs.el @@ -3,15 +3,30 @@ (or exec-directory "../lib-src/"))) + +(defun delete-file-with-children (filename) + (if (file-directory-p filename) + (let ((files + (directory-files filename 'full "^[^.]" 'so-sort))) + (if files + (dolist (file files) + (delete-file-with-children file))) + (remove-directory filename)) + (delete-file filename))) + (when (or load-ignore-elc-files (not (file-exists-p system-char-database-directory))) - (condition-case nil - (call-process "rm" nil nil nil "-rf" system-char-database-directory) - (error nil)) - (load "dumped-chars.el") (dolist (file system-char-db-source-file-list) (pureload file)) + + ;;(condition-case nil + ;; (call-process "rm" nil 0 nil + ;; "-rf" system-char-database-directory) + ;;(error (princ (format "Can't delete %s\n" + ;; system-char-database-directory)))) + (if (file-exists-p system-char-database-directory) + (delete-file-with-children system-char-database-directory)) (dolist (attribute (char-attribute-list)) (save-char-attribute-table attribute)) -- 1.7.10.4