mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
install.c: Preserve time stamps before changing owner or file mode bits,
for consistency with other coreutils programs.
This commit is contained in:
1 parent
1ea616697a
commit
8406e92795
2 files changed
+9
-4
No files matched your search
@@ -1,3 +1,9 @@
|
||||
2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* src/install.c (install_file_in_file): Preserve time stamps
|
||||
before changing owner or file mode bits, for consistency with
|
||||
other coreutils programs.
|
||||
|
||||
2006-12-03 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/misc/date-sec: Output a fixed string.
|
||||
|
||||
+3
-4
@@ -459,11 +459,10 @@ install_file_in_file (const char *from, const char *to,
|
||||
return false;
|
||||
if (strip_files)
|
||||
strip (to);
|
||||
if (! change_attributes (to))
|
||||
if (x->preserve_timestamps && (strip_files || ! S_ISREG (from_sb.st_mode))
|
||||
&& ! change_timestamps (&from_sb, to))
|
||||
return false;
|
||||
if (x->preserve_timestamps && (strip_files || ! S_ISREG (from_sb.st_mode)))
|
||||
return change_timestamps (&from_sb, to);
|
||||
return true;
|
||||
return change_attributes (to);
|
||||
}
|
||||
|
||||
/* Copy file FROM into directory TO_DIR, keeping its same name,
|
||||
|
||||
Reference in new issue
Block a user