(svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
-Codechange: add support for personal directories on Windows. -Fix [FS#153, FS#193, FS#502, FS#816, FS#854]: fix issues related to fixed names, fixed places of files/directories and application bundles.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "../variables.h"
|
||||
#include "../genworld.h"
|
||||
#include "../helpers.hpp"
|
||||
#include "../fileio.h"
|
||||
|
||||
// This file handles all the server-commands
|
||||
|
||||
@@ -307,14 +308,13 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP)
|
||||
}
|
||||
|
||||
if (cs->status == STATUS_AUTH) {
|
||||
char filename[256];
|
||||
const char *filename = "network_server.tmp";
|
||||
Packet *p;
|
||||
|
||||
// Make a dump of the current game
|
||||
snprintf(filename, lengthof(filename), "%s%snetwork_server.tmp", _paths.autosave_dir, PATHSEP);
|
||||
if (SaveOrLoad(filename, SL_SAVE) != SL_OK) error("network savedump failed");
|
||||
if (SaveOrLoad(filename, SL_SAVE, AUTOSAVE_DIR) != SL_OK) error("network savedump failed");
|
||||
|
||||
file_pointer = fopen(filename, "rb");
|
||||
file_pointer = FioFOpenFile(filename, "rb", AUTOSAVE_DIR);
|
||||
fseek(file_pointer, 0, SEEK_END);
|
||||
|
||||
if (ftell(file_pointer) == 0) error("network savedump failed - zero sized savegame?");
|
||||
|
Reference in New Issue
Block a user