From: Tom Breton (Tehom) Date: Sun, 9 Jan 2011 21:39:58 +0000 (-0500) Subject: Make directory for symlinks if it doesn't exist X-Git-Url: https://repo.or.cz/w/elinstall.git/commitdiff_plain/0dbfe3340f64164bac2064b8ad71cace023c22d6 Make directory for symlinks if it doesn't exist --- diff --git a/elinstall.el b/elinstall.el index 4372095..3f6c8a4 100644 --- a/elinstall.el +++ b/elinstall.el @@ -815,10 +815,14 @@ PRIORITY must be an integer or nil." "File %s already exists") target) (file-exists-p target)) + ;;Does nothing if file already exists. + (make-directory (file-name-directory target) t) (make-symbolic-link filename target - nil))))) + ;;We already checked file-existence wrt user + ;;preferences, so force creation. + t))))) ;;;_ . elinstall-add-to-dot-emacs (defun elinstall-add-to-dot-emacs (dot-emacs-name filename &rest r)