]> granicus.if.org Git - nethack/commitdiff
debian bug #23229 - save file permissions
authorcohrs <cohrs>
Thu, 16 Oct 2003 16:18:26 +0000 (16:18 +0000)
committercohrs <cohrs>
Thu, 16 Oct 2003 16:18:26 +0000 (16:18 +0000)
Use fqname buffer 1 for restoring the save file (just like save does when
creating it) so the value won't change out from under the code in unixmain.
- Also moved a tty-specific hack in docompress_file that was causing
the 'y' response to the "keep the save file" prompt to be echoed twice.

doc/fixes34.3
src/files.c
sys/unix/unixmain.c

index 1628d9f2ec13b599a8bc3adc88990381ad55ae8c..0f0c1de5bef82909b02657654b4517646ede6214 100644 (file)
@@ -62,6 +62,7 @@ win32gui: you couldn't specify an alignment in defaults.nh and have it stick
 win32gui: allow race/gender/alignment selections beyond those specified in
        defaults.nh, while still honoring defaults.nh choices
 unix: don't define errno if NHSTDC
+unix: save file permissions could be wrong in explore/debug mode
 X11: avoid a possible crash when using window manger to close a player
        selection window
 Gnome: add Quiver menu item, fix outdated Quit menu item
index 73577f94d87798708f5ff8c698ebda33fd1b85b8..63f9d2f0ecc67d0c3a10f47fe4b1e5da2e93e4c8 100644 (file)
@@ -1119,7 +1119,6 @@ boolean uncomp;
 # endif
        args[++i] = (char *)0;
 
-       f = fork();
 # ifdef TTY_GRAPHICS
        /* If we don't do this and we are right after a y/n question *and*
         * there is an error message from the compression, the 'y' or 'n' can
@@ -1128,6 +1127,7 @@ boolean uncomp;
        if (istty)
            mark_synch();
 # endif
+       f = fork();
        if (f == 0) {   /* child */
 # ifdef TTY_GRAPHICS
                /* any error messages from the compression must come out after
index f2eb52321088b6194a64245d5e38676735ec8556..8d269e9012f3c758bef1a306b633e84acc358503 100644 (file)
@@ -262,7 +262,7 @@ char *argv[];
                 */
                boolean remember_wiz_mode = wizard;
 #endif
-               const char *fq_save = fqname(SAVEF, SAVEPREFIX, 0);
+               const char *fq_save = fqname(SAVEF, SAVEPREFIX, 1);
 
                (void) chmod(fq_save,0);        /* disallow parallel restores */
                (void) signal(SIGINT, (SIG_RET_TYPE) done1);