changeset 95674:0c2f83acfffe

(vc-dir-children-marked-p): Fix child check.
author Andreas Schwab <schwab@suse.de>
date Sun, 08 Jun 2008 15:31:08 +0000
parents 52ec5c5888db
children c9fb857e1ebe
files lisp/ChangeLog lisp/vc-dispatcher.el
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Jun 08 15:18:28 2008 +0000
+++ b/lisp/ChangeLog	Sun Jun 08 15:31:08 2008 +0000
@@ -1,5 +1,7 @@
 2008-06-08  Andreas Schwab  <schwab@suse.de>
 
+	* vc-dispatcher.el (vc-dir-children-marked-p): Fix child check.
+
 	* vc-cvs.el (vc-cvs-dir-status): Pass -f to cvs.
 
 	* vc-dispatcher.el (vc-dir-move-to-goal-column): Don't move in an
--- a/lisp/vc-dispatcher.el	Sun Jun 08 15:18:28 2008 +0000
+++ b/lisp/vc-dispatcher.el	Sun Jun 08 15:31:08 2008 +0000
@@ -1057,15 +1057,14 @@
 
 (defun vc-dir-children-marked-p (arg)
   ;; Return nil if none of the children of arg is marked.
-  (let* ((argdir (vc-dir-node-directory arg))
-	 (arglen (length argdir))
+  (let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg))))
 	 (is-child t)
 	 (crt arg)
 	 data dir)
     (while (and is-child (setq crt (ewoc-next vc-ewoc crt)))
       (setq data (ewoc-data crt))
       (setq dir (vc-dir-node-directory crt))
-      (if (string-equal argdir (substring dir 0 arglen))
+      (if (string-match argdir-re dir)
 	  (when (vc-dir-fileinfo->marked data)
 	    (error "Cannot mark `%s', child `%s' marked"
 		   (vc-dir-fileinfo->name (ewoc-data arg))