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).
This commit is contained in:
parent
4f40f5f63a
commit
0cd2e923db
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue