mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 20:06:51 +00:00
No more useless errors/warnings at all!
This commit is contained in:
parent
73de0e9494
commit
c2851467e5
@ -490,19 +490,22 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) {
|
||||
return x;
|
||||
#endif
|
||||
}
|
||||
x.type = File::IsDirectory(fullName) ? FILETYPE_NORMAL : FILETYPE_DIRECTORY;
|
||||
x.type = File::IsDirectory(fullName) ? FILETYPE_DIRECTORY : FILETYPE_NORMAL;
|
||||
x.exists = true;
|
||||
|
||||
if (x.type != FILETYPE_DIRECTORY)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
GetFileAttributesEx(fullName.c_str(), GetFileExInfoStandard, &data);
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
GetFileAttributesEx(fullName.c_str(), GetFileExInfoStandard, &data);
|
||||
|
||||
x.size = data.nFileSizeLow | ((u64)data.nFileSizeHigh<<32);
|
||||
x.size = data.nFileSizeLow | ((u64)data.nFileSizeHigh<<32);
|
||||
#else
|
||||
x.size = File::GetSize(fullName);
|
||||
//TODO
|
||||
x.size = File::GetSize(fullName);
|
||||
//TODO
|
||||
#endif
|
||||
x.mtime = File::GetModifTime(fullName);
|
||||
x.mtime = File::GetModifTime(fullName);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ nextblock:
|
||||
|
||||
}
|
||||
|
||||
ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(std::string path)
|
||||
ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(std::string path, bool catchError)
|
||||
{
|
||||
if (path.length() == 0)
|
||||
{
|
||||
@ -297,7 +297,10 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(std::string path)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(FILESYS,"File %s not found", path.c_str());
|
||||
if (catchError)
|
||||
{
|
||||
ERROR_LOG(FILESYS,"File %s not found", path.c_str());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -502,7 +505,7 @@ PSPFileInfo ISOFileSystem::GetFileInfo(std::string filename)
|
||||
return fileInfo;
|
||||
}
|
||||
|
||||
TreeEntry *entry = GetFromPath(filename);
|
||||
TreeEntry *entry = GetFromPath(filename, false);
|
||||
PSPFileInfo x;
|
||||
if (!entry)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ class ISOFileSystem : public IFileSystem
|
||||
TreeEntry entireISO;
|
||||
|
||||
void ReadDirectory(u32 startsector, u32 dirsize, TreeEntry *root);
|
||||
TreeEntry *GetFromPath(std::string path);
|
||||
TreeEntry *GetFromPath(std::string path, bool catchError=true);
|
||||
std::string EntryFullPath(TreeEntry *e);
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user