chmod on the NEW file
authorGlenn L McGrath <bug1@ihug.co.nz>
Mon, 26 Aug 2002 17:17:27 +0000 (17:17 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Mon, 26 Aug 2002 17:17:27 +0000 (17:17 -0000)
archival/gunzip.c

index c4712270d45bbdc0a3a99badc302f5bfd3962ca4..ac2fb17eda119eda766b053f84f4eba5d536f195 100644 (file)
@@ -154,7 +154,7 @@ extern int gunzip_main(int argc, char **argv)
                        out_file = xfopen(new_path, "w");
 
                        /* Set permissions on the file */
-                       chmod(old_path, stat_buf.st_mode);
+                       chmod(new_path, stat_buf.st_mode);
 
                        /* If unzip succeeds remove the old file */
                        delete_path = old_path;