Advanced Rogue 5: replace calls to unlink() with md_unlink().

This commit is contained in:
John "Elwin" Edwards 2015-08-11 16:12:09 -04:00
parent 4381177d66
commit 9ad85754bd
2 changed files with 4 additions and 3 deletions

View file

@ -984,6 +984,7 @@ extern char *md_crypt();
extern char *md_getroguedir();
extern void md_init();
extern FILE * md_fdopen(int fd, char *mode);
extern int md_unlink(char *file);
/*
* Now all the global variables

View file

@ -91,7 +91,7 @@ gotfile:
*/
if (save_file(savef) != 0) {
msg("Cannot create save file.");
unlink(file_name);
md_unlink(file_name);
return(FALSE);
}
else return(TRUE);
@ -235,9 +235,9 @@ char **envp;
if (!wizard)
{
if (unlink(file) < 0) {
if (md_unlink(file) < 0) {
close(inf); /* only close if system insists */
if (unlink(file) < 0) {
if (md_unlink(file) < 0) {
endwin();
printf("\nCannot unlink file\n");
return FALSE;