(svn r22824) -Codechange: pass sub directory to ini loading

This commit is contained in:
rubidium
2011-08-24 13:38:26 +00:00
parent 5f06d5067f
commit 05300a00b1
7 changed files with 17 additions and 12 deletions

View File

@@ -204,9 +204,10 @@ void IniLoadFile::RemoveGroup(const char *name)
/**
* 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);
@@ -218,7 +219,7 @@ void IniLoadFile::LoadFromDisk(const char *filename)
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);