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

This commit is contained in:
Sacha committed 2012-12-31 17:52:57 +10:00
1 parent d6d2b1a7b3
commit aa99c3f859
3 files changed
+18 -4

No files matched your search

+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;