aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorJens-Uwe Mager <[email protected]>2023-12-13 11:06:06 -0500
committerGitHub <[email protected]>2023-12-13 09:06:06 -0700
commit56c6b3f6731015098fb3e6c05de43f3bb1d3f94c (patch)
tree73f2fafba94bc517486c64f8182ce27b4ddd1d8d /cmd
parentcbbd1df904231de58ab6c29e681050c4709169be (diff)
downloadcaddy-56c6b3f6731015098fb3e6c05de43f3bb1d3f94c.tar.gz
caddy-56c6b3f6731015098fb3e6c05de43f3bb1d3f94c.zip
cmd: Preserve LastModified date when exporting storage (#5968)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/storagefuncs.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/storagefuncs.go b/cmd/storagefuncs.go
index 6a6daec76..60e25485d 100644
--- a/cmd/storagefuncs.go
+++ b/cmd/storagefuncs.go
@@ -200,9 +200,10 @@ func cmdExportStorage(fl Flags) (int, error) {
}
hdr := &tar.Header{
- Name: k,
- Mode: 0o600,
- Size: int64(len(v)),
+ Name: k,
+ Mode: 0o600,
+ Size: int64(len(v)),
+ ModTime: info.Modified,
}
if err = tw.WriteHeader(hdr); err != nil {