quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] Fix mode on backup files


From: Dean Roehrich
Subject: [Quilt-dev] Fix mode on backup files
Date: Tue, 01 Jun 2004 15:04:54 -0500

The use of backup files broke a few months ago, and I've been sitting on the
patch for awhile.  The mode on the backup needs to match the original.

Dean


Index: work/lib/backup-files.c
===================================================================
--- work.orig/lib/backup-files.c        2004-04-09 10:10:13.000000000 -0500
+++ work/lib/backup-files.c     2004-04-20 16:39:11.000000000 -0500
@@ -189,6 +189,7 @@
                        goto fail;
                if (rename(tmpname, filename))
                        goto fail;
+               chmod(filename, st.st_mode);
 
                error = 0;
        fail:
@@ -239,7 +240,7 @@
                        if (link_or_copy(file, &st, backup))
                                return 1;
                        if (opt_nolinks) {
-                               if (ensure_nolinks(file))
+                               if (ensure_nolinks(backup))
                                        return 1;
                        }
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]