1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-29 16:08:29 +02:00

Rename FILESYSTEM_directoryExists() to FILESYSTEM_exists()

The function is literally just an alias for PHYSFS_exists(), which does
not exclusively check for directories. Plus, the function is also used
to check if a non-directory file exists. Why is this function named
"directoryExists"?!
This commit is contained in:
Misa 2021-02-26 18:10:09 -08:00 committed by Ethan Lee
parent f372c22ce2
commit 452ef3b511

View File

@ -164,7 +164,7 @@ char *FILESYSTEM_getUserLevelDirectory(void)
return levelDir;
}
static bool FILESYSTEM_directoryExists(const char *fname)
static bool FILESYSTEM_exists(const char *fname)
{
return PHYSFS_exists(fname);
}
@ -199,7 +199,7 @@ void FILESYSTEM_mountassets(const char* path)
zip_path = cstr;
}
if (cstr && FILESYSTEM_directoryExists(zippath.c_str())) {
if (cstr && FILESYSTEM_exists(zippath.c_str())) {
printf("Custom asset directory is .data.zip at %s\n", zippath.c_str());
FILESYSTEM_mount(zippath.c_str());
graphics.reloadresources();
@ -223,7 +223,7 @@ void FILESYSTEM_mountassets(const char* path)
}
FILESYSTEM_assetsmounted = true;
graphics.reloadresources();
} else if (FILESYSTEM_directoryExists(dirpath.c_str())) {
} else if (FILESYSTEM_exists(dirpath.c_str())) {
printf("Custom asset directory exists at %s\n",dirpath.c_str());
FILESYSTEM_mount(dirpath.c_str());
graphics.reloadresources();