bin/27970: cp -pR does not preserve modification times of the directories if they are not empty

[ Available lists | Index of freebsd-bugs | Month of Jun 2001 | Week of 8 Jun 2001 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
<christophe.deroulers@ens.fr>
Date
8 Jun 2001 10:40:10
Subject
bin/27970: cp -pR does not preserve modification times of the directories if they are not empty
Message-ID
200106081735.f58HZqn16177@freefall.freebsd.org


[ Hide this part ]
 
>Number: 27970
>Category: bin
>Synopsis: cp -pR does not preserve modification times of the directories if they are not empty
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jun 08 10:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Christophe Deroulers
>Release: FreeBSD 4.2-RELEASE
>Organization:
Ecole normale superieure
>Environment:
FreeBSD pc-aa3.ens.fr 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386

>Description:
If a directory is not empty, cp -pR will correctly set the modification time of the directory after copy but will overwrite it with the current time when it will add the files inside the directory.

A similar problem occured with OpenBSD cp's and it was fixed some days ago, so it probably comes from the base code taken from BSD.

NB This is maybe the same problem as bin/16155.

>How-To-Repeat:
mkdir a
touch a/b
touch -m -t 01010000 a
# a has now time January, 1st at 00:00
cp -pR a b
# b should have time January, 1st but has not.

>Fix:
Look at OpenBSD cp bug fix ?

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Elapsed time: 0.103 seconds