From 029024c018e455dc7d5699d64036582844a86417 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Wed, 2 Jun 2004 08:38:52 +0000 Subject: - Fix from Dean Roehrich : Preserve file mode of original file when creating backup files. --- lib/backup-files.c | 2 ++ quilt.changes | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/backup-files.c b/lib/backup-files.c index 462ce4f..5f37ef5 100644 --- a/lib/backup-files.c +++ b/lib/backup-files.c @@ -137,6 +137,7 @@ link_or_copy(const char *from, struct stat *st, const char *to) close(from_fd); return 1; } + (void) fchmod(to_fd, st->st_mode); if (copy(from_fd, to_fd)) { fprintf(stderr, "%s -> %s: %s\n", from, to, strerror(errno)); unlink(to); @@ -187,6 +188,7 @@ ensure_nolinks(const char *filename) goto fail; if (copy(from_fd, to_fd)) goto fail; + (void) fchmod(to_fd, st.st_mode); if (rename(tmpname, filename)) goto fail; diff --git a/quilt.changes b/quilt.changes index e0f09c9..68244d5 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 1 22:59:41 CEST 2004 - agruen@suse.de + +- Fix from Dean Roehrich : Preserve file mode + of original file when creating backup files. + ------------------------------------------------------------------- Tue Jun 1 10:23:01 PDT 2004 - mquinson@tuxfamily.org -- cgit