debian bug #23229 - save file permissions

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.
This commit is contained in:
cohrs
2003-10-16 16:18:26 +00:00
parent 716b2e81f4
commit 36faeeea3c
3 changed files with 3 additions and 2 deletions

View 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 win32gui: allow race/gender/alignment selections beyond those specified in
defaults.nh, while still honoring defaults.nh choices defaults.nh, while still honoring defaults.nh choices
unix: don't define errno if NHSTDC 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 X11: avoid a possible crash when using window manger to close a player
selection window selection window
Gnome: add Quiver menu item, fix outdated Quit menu item Gnome: add Quiver menu item, fix outdated Quit menu item

View File

@@ -1119,7 +1119,6 @@ boolean uncomp;
# endif # endif
args[++i] = (char *)0; args[++i] = (char *)0;
f = fork();
# ifdef TTY_GRAPHICS # ifdef TTY_GRAPHICS
/* If we don't do this and we are right after a y/n question *and* /* 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 * there is an error message from the compression, the 'y' or 'n' can
@@ -1128,6 +1127,7 @@ boolean uncomp;
if (istty) if (istty)
mark_synch(); mark_synch();
# endif # endif
f = fork();
if (f == 0) { /* child */ if (f == 0) { /* child */
# ifdef TTY_GRAPHICS # ifdef TTY_GRAPHICS
/* any error messages from the compression must come out after /* any error messages from the compression must come out after

View File

@@ -262,7 +262,7 @@ char *argv[];
*/ */
boolean remember_wiz_mode = wizard; boolean remember_wiz_mode = wizard;
#endif #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) chmod(fq_save,0); /* disallow parallel restores */
(void) signal(SIGINT, (SIG_RET_TYPE) done1); (void) signal(SIGINT, (SIG_RET_TYPE) done1);