summaryrefslogtreecommitdiff
path: root/unix.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-01 00:14:22 +0000
committertron <tron@openttd.org>2005-08-01 00:14:22 +0000
commit984a4c68d6bf2c36b21f023b2114a46a5b65b8e1 (patch)
treebfb1d0b9f54310693b5e429b53d23b1c07727553 /unix.c
parent5352ad45822f4b49a03e2586474776b54873048b (diff)
downloadopenttd-984a4c68d6bf2c36b21f023b2114a46a5b65b8e1.tar.xz
(svn r2775) Deleting a file can fail, display an error message when it happens
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix.c b/unix.c
index 414e0baf2..c6a50b727 100644
--- a/unix.c
+++ b/unix.c
@@ -353,12 +353,12 @@ void FiosMakeSavegameName(char *buf, const char *name)
sprintf(buf, "%s/%s%s", _fios_path, name, extension);
}
-void FiosDelete(const char *name)
+bool FiosDelete(const char *name)
{
char path[512];
snprintf(path, lengthof(path), "%s/%s", _fios_path, name);
- unlink(path);
+ return unlink(path) == 0;
}
bool FileExists(const char *filename)