From 8d541c67db613e0bc4f84f9d86dcfae29dde22cb Mon Sep 17 00:00:00 2001 From: Athena Metis Date: Thu, 23 Apr 2020 15:37:04 +0100 Subject: [PATCH] Upload files with the local filesystem modified datetime rather than the current datetime --- cmd/put.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/put.go b/cmd/put.go index c793d14..6f6c3d5 100644 --- a/cmd/put.go +++ b/cmd/put.go @@ -100,7 +100,7 @@ func put(cmd *cobra.Command, args []string) (err error) { commitInfo.Mode.Tag = "overwrite" // The Dropbox API only accepts timestamps in UTC with second precision. - commitInfo.ClientModified = time.Now().UTC().Round(time.Second) + commitInfo.ClientModified = contentsInfo.ModTime().UTC().Round(time.Second) dbx := files.New(config) if contentsInfo.Size() > chunkSize {