+2003-03-28 Bruno Haible <bruno@clisp.org>
+
+ * copy-file.h (copy_file_preserving): Renamed from copy_file.
+ * copy-file.c (copy_file_preserving): Renamed from copy_file.
+ Preserve the owner and group as well.
+
2003-02-28 Bruno Haible <bruno@clisp.org>
Support for relocatable installation.
#define _(str) gettext (str)
void
-copy_file (const char *src_filename, const char *dest_filename)
+copy_file_preserving (const char *src_filename, const char *dest_filename)
{
int src_fd;
struct stat statbuf;
}
#endif
+ /* Preserve the owner and group. */
+ chown (dest_filename, statbuf.st_uid, statbuf.st_gid);
+
/* Preserve the access permissions. */
chmod (dest_filename, mode);
}
/* Copying of files.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
/* Copy a regular file: from src_filename to dest_filename.
The destination file is assumed to be a backup file.
+ Modification times, owner, group and access permissions are preserved as
+ far as possible.
Exit upon failure. */
-extern void copy_file (const char *src_filename, const char *dest_filename);
+extern void copy_file_preserving (const char *src_filename, const char *dest_filename);
+2003-03-28 Bruno Haible <bruno@clisp.org>
+
+ * msgmerge.c (main): Use copy_file_preserving instead of copy_file.
+
2003-03-16 Bruno Haible <bruno@clisp.org>
* str-list.h (string_list_join): Comment out.
if (backup_type != none)
{
backup_file = find_backup_file_name (output_file, backup_type);
- copy_file (output_file, backup_file);
+ copy_file_preserving (output_file, backup_file);
}
/* Write the merged message list out. */