GNU bug report logs -
#38707
dired-do-rename doesn't check for "/" !
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Sun, 22 Dec 2019 16:38:01 UTC
Severity: minor
Tags: fixed
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Nick Helm <nick <at> tenpoint.co.nz> writes:
> Dired could check for and issue an error in the case where the source is
> a file and the target appears to be a non-existent directory. Something
> like this perhaps?
[...]
> + (if (and (not (file-directory-p (car fn-list)))
> + (not (file-directory-p target))
> + (directory-name-p target))
> + (error "%s: Target directory does not exist: %s" operation target))
I think this makes sense, so I've applied it to Emacs 28.1. However, it
is a slight behavioural change -- previously you could enter, say
"/tmp/bar/" (when moving one file), and it would move the file to the
file "/tmp/bar".
I think the new behaviour is better (i.e., bugging out), but if people
complain for some reason, then it should perhaps be reverted.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.