diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2004-06-02 08:38:52 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2004-06-02 08:38:52 +0000 |
commit | 029024c018e455dc7d5699d64036582844a86417 (patch) | |
tree | 5453d09110312af693d48b8ac5eec8b35df34d58 | |
parent | 4c561530fb643c46cc0d903ea518788bb1665bdb (diff) | |
download | quilt-029024c018e455dc7d5699d64036582844a86417.tar.gz |
- Fix from Dean Roehrich <roehrich@sgi.com>: Preserve file mode
of original file when creating backup files.
-rw-r--r-- | lib/backup-files.c | 2 | ||||
-rw-r--r-- | quilt.changes | 6 |
2 files changed, 8 insertions, 0 deletions
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,4 +1,10 @@ ------------------------------------------------------------------- +Tue Jun 1 22:59:41 CEST 2004 - agruen@suse.de + +- Fix from Dean Roehrich <roehrich@sgi.com>: Preserve file mode + of original file when creating backup files. + +------------------------------------------------------------------- Tue Jun 1 10:23:01 PDT 2004 - mquinson@tuxfamily.org - document common options to all scripts (--trace and --quiltrc) |