From: Tino Calancha Date: Sun, 24 Apr 2016 15:05:33 +0000 (+0200) Subject: Don't kill ~/ if it's the top level directory X-Git-Tag: emacs-25.0.94~153 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0cd2e923dba8d8c7128b0c084ce6af22069e8db5;p=emacs.git Don't kill ~/ if it's the top level directory * lisp/dired-aux.el (dired-kill-subdir): Don't kill ~/ if it's the top level directory (bug#23017). --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d29abf3cab8..08db1877f1a 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2486,8 +2486,8 @@ Lower levels are unaffected." (cur-dir (dired-current-directory)) (cons (assoc-string cur-dir dired-switches-alist)) buffer-read-only) - (if (equal cur-dir default-directory) - (error "Attempt to kill top level directory")) + (when (equal cur-dir (expand-file-name default-directory)) + (error "Attempt to kill top level directory")) (prog1 (if remember-marks (dired-remember-marks beg end)) (delete-region beg end)