From aa1ab10ee14428741599fc66025becc9fc191674 Mon Sep 17 00:00:00 2001 From: piepie62 Date: Wed, 20 May 2020 00:05:19 -0400 Subject: [PATCH] Add mtime to stat --- libctru/source/archive_dev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libctru/source/archive_dev.c b/libctru/source/archive_dev.c index dd3954b..6879f19 100644 --- a/libctru/source/archive_dev.c +++ b/libctru/source/archive_dev.c @@ -839,6 +839,13 @@ archive_stat(struct _reent *r, archive_file_t tmpfd = { .fd = fd }; rc = archive_fstat(r, &tmpfd, st); FSFILE_Close(fd); + if (R_SUCCEEDED(rc)) + { + u64 mtime; + rc = archive_getmtime(file, &mtime); + st->st_mtim.tv_sec = mtime; + st->st_mtim.tv_nsec = 0; + } return rc; }