Make directory for symlinks if it doesn't exist
authorTom Breton (Tehom) <tehom@panix.com>
Sun, 9 Jan 2011 21:39:58 +0000 (9 16:39 -0500)
committerTom Breton (Tehom) <tehom@panix.com>
Sun, 9 Jan 2011 21:39:58 +0000 (9 16:39 -0500)
elinstall.el

index 4372095..3f6c8a4 100644 (file)
@@ -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)