Make dir scan work cross-platform. Update Qt project files.

This commit is contained in:
Sacha
2012-12-31 17:52:57 +10:00
parent d6d2b1a7b3
commit aa99c3f859
3 changed files with 18 additions and 4 deletions
+3 -1
View File
@@ -558,7 +558,9 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) {
while ((dirp = readdir(dp)) != NULL) {
PSPFileInfo entry;
if(dirp->d_type == DT_DIR)
struct stat s;
stat(dirp->d_name, &s);
if (S_ISDIR(s.st_mode))
entry.type = FILETYPE_DIRECTORY;
else
entry.type = FILETYPE_NORMAL;