]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-dir-children-marked-p): Fix child check.
authorAndreas Schwab <schwab@suse.de>
Sun, 8 Jun 2008 15:31:08 +0000 (15:31 +0000)
committerAndreas Schwab <schwab@suse.de>
Sun, 8 Jun 2008 15:31:08 +0000 (15:31 +0000)
lisp/ChangeLog
lisp/vc-dispatcher.el

index c5241a748394bed1b859e210c691e132e29d4dbc..e7f53385ccd49d21495b5cf5fec8925af292776c 100644 (file)
@@ -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
index 7179d77e8f4861dfe9458427b5fe9ddf5ac711eb..6bd43cb2644094b05608b9c907c68d7f52f8115d 100644 (file)
@@ -1057,15 +1057,14 @@ If a prefix argument is given, move by that many lines."
 
 (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))