PSP2: Use VFileOpen in VDirSce.open to ensure file modes are translated properly

This commit is contained in:
Jeffrey Pfau 2015-08-25 22:40:53 -07:00
parent e37a3253da
commit a1eb021af5
1 changed files with 2 additions and 2 deletions

View File

@ -181,10 +181,10 @@ struct VFile* _vdsceOpenFile(struct VDir* vd, const char* path, int mode) {
return 0;
}
const char* dir = vdsce->path;
char* combined = malloc(sizeof(char) * (strlen(path) + strlen(dir) + 2));
char* combined = malloc(sizeof(char) * (strlen(path) + strlen(dir) + strlen(PATH_SEP) + 1));
sprintf(combined, "%s%s%s", dir, PATH_SEP, path);
struct VFile* file = VFileOpenSce(combined, mode, 0666);
struct VFile* file = VFileOpen(combined, mode);
free(combined);
return file;
}