diff --git a/src/fileio.cpp b/src/fileio.cpp index a2db038962..54a7ef9329 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -350,6 +350,12 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, } } + /* Sometimes a full path is given. To support + * the 'subdirectory' must be 'removed'. */ + if (f == NULL && subdir != NO_DIRECTORY) { + f = FioFOpenFile(filename, mode, NO_DIRECTORY, filesize); + } + return f; }