Skip to content

Commit

Permalink
sceIoGetStat: Fix retrieving timestamps from directories
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jul 18, 2024
1 parent 77ad24d commit d331e80
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Core/FileSystems/DirectoryFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,15 +697,15 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) {

if (x.type != FILETYPE_DIRECTORY) {
x.size = info.size;
x.access = info.access;
time_t atime = info.atime;
time_t ctime = info.ctime;
time_t mtime = info.mtime;

localtime_r((time_t*)&atime, &x.atime);
localtime_r((time_t*)&ctime, &x.ctime);
localtime_r((time_t*)&mtime, &x.mtime);
}
x.access = info.access;
time_t atime = info.atime;
time_t ctime = info.ctime;
time_t mtime = info.mtime;

localtime_r((time_t*)&atime, &x.atime);
localtime_r((time_t*)&ctime, &x.ctime);
localtime_r((time_t*)&mtime, &x.mtime);

return ReplayApplyDiskFileInfo(x, CoreTiming::GetGlobalTimeUs());
}
Expand Down

0 comments on commit d331e80

Please sign in to comment.