[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-t
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps. |
Date: |
Wed, 21 Mar 2012 13:44:55 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107646
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11055
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2012-03-21 13:44:55 -0400
message:
* lisp/files.el (move-file-to-trash): Files aren't regexps.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-03-21 17:17:23 +0000
+++ b/lisp/ChangeLog 2012-03-21 17:44:55 +0000
@@ -1,3 +1,7 @@
+2012-03-21 Stefan Monnier <address@hidden>
+
+ * files.el (move-file-to-trash): Files aren't regexps (bug#11055).
+
2012-03-21 Sam Steingold <address@hidden>
* progmodes/etags.el (tags-completion-at-point-function):
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2012-03-09 03:21:49 +0000
+++ b/lisp/files.el 2012-03-21 17:44:55 +0000
@@ -6563,7 +6563,7 @@
(new-fn (expand-file-name (file-name-nondirectory fn)
trash-dir)))
;; We can't trash a parent directory of trash-directory.
- (if (string-match fn trash-dir)
+ (if (string-prefix-p fn trash-dir)
(error "Trash directory `%s' is a subdirectory of `%s'"
trash-dir filename))
(unless (file-directory-p trash-dir)
@@ -6595,10 +6595,10 @@
(file-name-directory fn)))
(error "Cannot move %s to trash: Permission denied" filename))
;; The trashed file cannot be the trash dir or its parent.
- (if (string-match fn trash-files-dir)
+ (if (string-prefix-p fn trash-files-dir)
(error "The trash directory %s is a subdirectory of %s"
trash-files-dir filename))
- (if (string-match fn trash-info-dir)
+ (if (string-prefix-p fn trash-info-dir)
(error "The trash directory %s is a subdirectory of %s"
trash-info-dir filename))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps.,
Stefan Monnier <=