Improve DirectoryFileSystem's wide char handling.
This commit is contained in:
parent
865057c8b2
commit
657f7f1a2d
1 changed files with 5 additions and 0 deletions
|
@ -548,8 +548,13 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) {
|
|||
|
||||
if (x.type != FILETYPE_DIRECTORY)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
struct _stat64i32 s;
|
||||
_wstat64i32(ConvertUTF8ToWString(fullName).c_str(), &s);
|
||||
#else
|
||||
struct stat s;
|
||||
stat(fullName.c_str(), &s);
|
||||
#endif
|
||||
|
||||
x.size = File::GetSize(fullName);
|
||||
x.access = s.st_mode & 0x1FF;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue