Support for composite RBF.

This commit is contained in:
sorgelig
2018-09-29 15:58:23 +08:00
parent f65385d308
commit e7429ec866
4 changed files with 54 additions and 25 deletions

View File

@@ -48,7 +48,15 @@ void FileClose(fileTYPE *file)
int FileOpenEx(fileTYPE *file, const char *name, int mode, char mute)
{
sprintf(full_path, "%s/%s", (mode == -1) ? "" : getRootDir(), name);
const char *root = getRootDir();
if (strncasecmp(getRootDir(), name, strlen(root)))
{
sprintf(full_path, "%s/%s", (mode == -1) ? "" : root, name);
}
else
{
sprintf(full_path, name);
}
FileClose(file);
file->mode = 0;