From e6186887f4316ebbd8f8f281b81aa54611a44048 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Sat, 20 Apr 2019 22:08:18 +0200 Subject: Also restore modification time for directories when extracting --- src/cc4group.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cc4group.c') diff --git a/src/cc4group.c b/src/cc4group.c index 85bc48b..5b3e888 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -1355,6 +1355,12 @@ static bool cc4group_extractChildren(CC4Group* const this, const C4GroupEntryDat } } + struct utimbuf times = {.actime = root->header->Creation, .modtime = root->header->Creation}; + if(utime(tmpPath, ×) == -1) + { + fprintf(stderr, "WARNING: utime: Setting modification time for \"%s\" failed: %s\n", tmpPath, strerror(errno)); + } + success = true; goto ret; } -- cgit v1.2.3-54-g00ecf