@@ -201,27 +201,28 @@ void IniLoadFile::RemoveGroup(const char
delete group;
}
/**
* Load the Ini file's data from the disk.
* @param filename the file to load.
* @param subdir the sub directory to load the file from.
* @pre nothing has been loaded yet.
*/
void IniLoadFile::LoadFromDisk(const char *filename)
void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
{
assert(this->last_group == &this->group);
char buffer[1024];
IniGroup *group = NULL;
char *comment = NULL;
uint comment_size = 0;
uint comment_alloc = 0;
size_t end;
FILE *in = this->OpenFile(filename, &end);
FILE *in = this->OpenFile(filename, subdir, &end);
if (in == NULL) return;
end += ftell(in);
/* for each line in the file */
while ((size_t)ftell(in) < end && fgets(buffer, sizeof(buffer), in)) {