bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Buggy mv --interactive --reply=no, hopefully solved here


From: Vlada Macek
Subject: Buggy mv --interactive --reply=no, hopefully solved here
Date: Mon, 09 May 2005 21:56:23 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Hi,

even after testing the recent anonymous checkout of

    cvs -z3 -d:ext:address@hidden:/cvsroot/coreutils co coreutils

I still believe there is a bug in `mv'. Try to run

    mv --interactive --reply=no plain1 plain2

and given both plains exist, plain2 gets overwritten. This is not
expected behavior, not just by me (there is a Debian bug filled in).
Command `cp' is not affected.

The problem seems to be fixed by this:

--- coreutils-cvs/src/copy.c    2005-04-11 22:06:34.000000000 +0200
+++ coreutils/src/copy.c        2005-05-09 21:43:40.539405480 +0200
@@ -805,14 +805,13 @@
 static bool
 abandon_move (const struct cp_options *x,
               char const *dst_path,
               struct stat const *dst_sb)
 {
   assert (x->move_mode);
-  return ((x->interactive == I_ALWAYS_NO
-           && UNWRITABLE (dst_path, dst_sb->st_mode))
+  return ((x->interactive == I_ALWAYS_NO)
           || ((x->interactive == I_ASK_USER
                || (x->interactive == I_UNSPECIFIED
                    && x->stdin_tty
                    && UNWRITABLE (dst_path, dst_sb->st_mode)))
               && (overwrite_prompt (dst_path, dst_sb), 1)
               && ! yesno ()));


Please carbon me with replies, since I'm not on this list. Thanks.

-- 

\//\/\
(Sometimes credited as 1494 F8DD 6379 4CD7 E7E3 1FC9 D750 4243 1F05 9424.)

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]