mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +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
|
||||
EmuFileType Identify_File(std::string &filename)
|
||||
{
|
||||
if (filename.size() < 5) {
|
||||
if (filename.size() == 0) {
|
||||
ERROR_LOG(LOADER, "invalid filename %s", filename.c_str());
|
||||
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"))
|
||||
{
|
||||
return FILETYPE_PSP_ISO;
|
||||
|
Loading…
Reference in New Issue
Block a user