comparison arogue5/save.c @ 198:7795b0938921

Advanced Rogue 5: replace calls to unlink() with md_unlink().
author John "Elwin" Edwards
date Tue, 11 Aug 2015 16:12:09 -0400
parents d852b8f088c5
children efdbeec0816d
comparison
equal deleted inserted replaced
197:61d1c9ac9be7 198:7795b0938921
89 * write out encrpyted file (after a stat) 89 * write out encrpyted file (after a stat)
90 * The fwrite is to force allocation of the buffer before the write 90 * The fwrite is to force allocation of the buffer before the write
91 */ 91 */
92 if (save_file(savef) != 0) { 92 if (save_file(savef) != 0) {
93 msg("Cannot create save file."); 93 msg("Cannot create save file.");
94 unlink(file_name); 94 md_unlink(file_name);
95 return(FALSE); 95 return(FALSE);
96 } 96 }
97 else return(TRUE); 97 else return(TRUE);
98 } 98 }
99 99
233 return(FALSE); 233 return(FALSE);
234 } 234 }
235 235
236 if (!wizard) 236 if (!wizard)
237 { 237 {
238 if (unlink(file) < 0) { 238 if (md_unlink(file) < 0) {
239 close(inf); /* only close if system insists */ 239 close(inf); /* only close if system insists */
240 if (unlink(file) < 0) { 240 if (md_unlink(file) < 0) {
241 endwin(); 241 endwin();
242 printf("\nCannot unlink file\n"); 242 printf("\nCannot unlink file\n");
243 return FALSE; 243 return FALSE;
244 } 244 }
245 } 245 }