bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp -i and mv -i incompatibility with POSIX


From: Jim Meyering
Subject: Re: cp -i and mv -i incompatibility with POSIX
Date: Wed, 20 Sep 2006 11:03:44 +0200

Paul Eggert <address@hidden> wrote:
> Here's a patch that fixes an incompability of cp -i and mv -i with
> POSIX.  POSIX requires a prompt fairly early on, so that the user can
> bail out from an operation they know will fail.  But coreutils
> sometimes looks ahead, sees that the operation will fail, and reports
> an error message before prompting.
>
> This incompatibility has been around for a while (at least since 5.97)
> so it's not a recent regression.

Indeed, it's not recent at all :)
It was introduced in '97 or '98, somewhere between
fileutils-3.16 and fileutils-4.0.

> Since it's not a big deal I thought
> I'd like a 2nd opinion before installing it; perhaps it ought to wait
> until after the next stable release.

At first glance, it's a pretty hairy change, but I've convinced
myself it's safe, so please go ahead and check it in.
The resulting code is even a little bit less complicated, imho.
I appreciate the accompanying test cases.

Thank you!

> 2006-09-19  Paul Eggert  <address@hidden>
>
>       * src/copy.c (copy_internal): With -i, prompt even if the source
>       is a directory and the destination is not.  This is required by
>       POSIX and gives the user a chance to bail out before failing.
>       * tests/cp/Makefile.am (TESTS): Add cp-i.
>       * tests/cp/cp-i: New file.
>       * tests/mv/Makefile.am (TESTS): Add i-5.
>       * tests/mv/i-5: New file.




reply via email to

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