[Change] Using remove() as apposed to unlink() for portability.
This commit is contained in:
parent
45333c33d5
commit
099e1ba251
1
TODO
1
TODO
@ -5,7 +5,6 @@ Vital:
|
|||||||
-- System obstacles and such.
|
-- System obstacles and such.
|
||||||
-- Interference
|
-- Interference
|
||||||
-- Asteroids.
|
-- Asteroids.
|
||||||
-- More loading screens.
|
|
||||||
-- Real news.
|
-- Real news.
|
||||||
-- Dynamic Economy.
|
-- Dynamic Economy.
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#ifdef _POSIX_SOURCE
|
#include <stdio.h> /* remove() */
|
||||||
#include <unistd.h> /* Unlink. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "lephisto.h"
|
#include "lephisto.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
@ -191,7 +188,7 @@ static void load_menu_delete(unsigned int wdw, char* str) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
snprintf(path, PATH_MAX, "%ssaves/%s.ls", lfile_basePath(), save);
|
snprintf(path, PATH_MAX, "%ssaves/%s.ls", lfile_basePath(), save);
|
||||||
unlink(path);
|
remove(path); /* Remove is more portable and will call unlink on Linux. */
|
||||||
|
|
||||||
/* Need to reload the menu. */
|
/* Need to reload the menu. */
|
||||||
load_menu_close(wdw, NULL);
|
load_menu_close(wdw, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user