diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-04-20 22:08:18 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-04-20 22:08:18 +0200 |
| commit | e6186887f4316ebbd8f8f281b81aa54611a44048 (patch) | |
| tree | 28d1169f007e31a547d822de7202a15281f35088 /src | |
| parent | 70a0ccbcc1a1e029e9d41e10f292ca320a4c3417 (diff) | |
| download | cc4group-e6186887f4316ebbd8f8f281b81aa54611a44048.tar.gz cc4group-e6186887f4316ebbd8f8f281b81aa54611a44048.zip | |
Also restore modification time for directories when extracting
Diffstat (limited to 'src')
| -rw-r--r-- | src/cc4group.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |
