From: tomo Date: Fri, 22 Feb 2002 18:38:36 +0000 (+0000) Subject: (delete-file-with-children): New function; use it instead of "rm". X-Git-Tag: r21-2-44-lazy-n7c~83 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a280b80c94e140ae0b1ae247d883d5794019e075;p=chise%2Fxemacs-chise.git- (delete-file-with-children): New function; use it instead of "rm". --- 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))