summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorTino Calancha <f92capac@gmail.com>2016-04-24 17:05:33 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2016-04-24 17:05:53 +0200
commit0cd2e923dba8d8c7128b0c084ce6af22069e8db5 (patch)
treefb436392153f4f79404dfdf973e58c10ca040d8b /lisp/dired-aux.el
parent4f40f5f63aaf2948a7b99c3a2eed0e50b2aa3a47 (diff)
downloademacs-0cd2e923dba8d8c7128b0c084ce6af22069e8db5.tar.gz
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).
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el4
1 files changed, 2 insertions, 2 deletions
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)