diff lisp/startup.el @ 63565:977d18df13bb

(command-line): Warn if specified user name has no home directory.
author Richard M. Stallman <rms@gnu.org>
date Fri, 17 Jun 2005 15:34:39 +0000
parents 84252cd99187
children 250dde129264 c016d82bf02b b7da78284d4c
line wrap: on
line diff
--- a/lisp/startup.el	Fri Jun 17 15:28:25 2005 +0000
+++ b/lisp/startup.el	Fri Jun 17 15:34:39 2005 +0000
@@ -797,6 +797,14 @@
     ;; the startup message.
     (setq inhibit-startup-message nil)
 
+    ;; Warn for invalid user name.
+    (and init-file-user
+	 (not (file-directory-p (expand-file-name (concat "~" init-file-user))))
+	 (display-warning 'initialization
+			  (format "User %s has no home directory"
+				  init-file-user)
+			  :error))
+
     ;; Load that user's init file, or the default one, or none.
     (let (debug-on-error-from-init-file
 	  debug-on-error-should-be-set