forked from github/server
writegame schreib das datenfile in den falschen folder
This commit is contained in:
parent
3298e06f7c
commit
b7dde0bcf0
|
@ -1303,7 +1303,7 @@ export_players(const char * path)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
int
|
||||
writegame(const char *filename, char quiet)
|
||||
{
|
||||
int i,n;
|
||||
|
@ -1325,10 +1325,9 @@ writegame(const char *filename, char quiet)
|
|||
|
||||
/* write_dynamictypes(); */
|
||||
|
||||
sprintf(buf, "%s/%s", datapath(), filename);
|
||||
F = cfopen(buf, "w");
|
||||
F = cfopen(filename, "w");
|
||||
if (F==NULL)
|
||||
return;
|
||||
return -1;
|
||||
|
||||
if (!quiet)
|
||||
printf("Schreibe die %d. Runde...\n", turn);
|
||||
|
@ -1458,6 +1457,7 @@ writegame(const char *filename, char quiet)
|
|||
#endif
|
||||
fclose(F);
|
||||
printf("\nOk.\n");
|
||||
return 0;
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ FILE * cfopen(const char *filename, const char *mode);
|
|||
int readorders(const char *);
|
||||
int creategame(void);
|
||||
extern int readgame(const char * filename, int backup);
|
||||
void writegame(const char *filename, char quiet);
|
||||
int writegame(const char *filename, char quiet);
|
||||
|
||||
extern void rsf(FILE * F, char *s, size_t len);
|
||||
|
||||
|
|
|
@ -51,8 +51,7 @@ write_game(const char *filename)
|
|||
free_units();
|
||||
remove_empty_factions(true);
|
||||
|
||||
writegame(filename, 0);
|
||||
return 0;
|
||||
return writegame(filename, 0);
|
||||
}
|
||||
|
||||
extern int writepasswd(void);
|
||||
|
|
|
@ -344,7 +344,7 @@ processturn(char *filename)
|
|||
if (!nowrite) {
|
||||
char ztext[64];
|
||||
sprintf(ztext, "%s/%d", datapath(), turn);
|
||||
writegame(ztext, 0);
|
||||
return writegame(ztext, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue