a5f7d18c6d
resistance fighter -- against ruthless alien killers, called ants, that have taken control over humanity. This is the SDL port, and includes the full game data.
19 lines
579 B
Text
19 lines
579 B
Text
$NetBSD: patch-ac,v 1.1.1.1 2003/05/19 19:47:19 blef Exp $
|
|
|
|
--- src/sdlport/setup.cpp.orig Sat Dec 14 21:00:32 2002
|
|
+++ src/sdlport/setup.cpp Mon May 12 15:12:22 2003
|
|
@@ -363,8 +363,12 @@
|
|
// Check if we already have a savegame directory
|
|
if( (fd = fopen( savedir, "r" )) == NULL )
|
|
{
|
|
- // FIXME: Add some error checking here
|
|
- mkdir( savedir, S_IRUSR | S_IWUSR | S_IXUSR );
|
|
+ savedir[strlen(savedir) - 1] = '\0';
|
|
+ if (mkdir( savedir, S_IRUSR | S_IWUSR | S_IXUSR )) {
|
|
+ perror("mkdir");
|
|
+ exit(1);
|
|
+ }
|
|
+ savedir[strlen(savedir)] = '/';
|
|
}
|
|
else
|
|
{
|