mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Allow filenames like e.g. F:\ as dirs.
This commit is contained in:
parent
7d6538bd0b
commit
3988a12801
@ -29,12 +29,12 @@
|
|||||||
// TODO : improve, look in the file more
|
// TODO : improve, look in the file more
|
||||||
EmuFileType Identify_File(std::string &filename)
|
EmuFileType Identify_File(std::string &filename)
|
||||||
{
|
{
|
||||||
if (filename.size() < 5) {
|
if (filename.size() == 0) {
|
||||||
ERROR_LOG(LOADER, "invalid filename %s", filename.c_str());
|
ERROR_LOG(LOADER, "invalid filename %s", filename.c_str());
|
||||||
return FILETYPE_ERROR;
|
return FILETYPE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string extension = filename.substr(filename.size() - 4);
|
std::string extension = filename.size() >= 5 ? filename.substr(filename.size() - 4) : "";
|
||||||
if (!strcasecmp(extension.c_str(),".iso"))
|
if (!strcasecmp(extension.c_str(),".iso"))
|
||||||
{
|
{
|
||||||
return FILETYPE_PSP_ISO;
|
return FILETYPE_PSP_ISO;
|
||||||
|
Loading…
Reference in New Issue
Block a user