From 7cf688e86e55ec341c91d417c8e1627284b73dc0 Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Mon, 11 Jan 2021 16:02:00 +0100 Subject: [PATCH] fix bug in purge for local storage --- cmd/cmd.go | 2 +- server/storage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index a0150ea..f6c62f8 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -12,7 +12,7 @@ import ( "google.golang.org/api/googleapi" ) -var Version = "1.2.0" +var Version = "1.2.1" var helpTemplate = `NAME: {{.Name}} - {{.Usage}} diff --git a/server/storage.go b/server/storage.go index 869fe24..1e4e719 100644 --- a/server/storage.go +++ b/server/storage.go @@ -102,7 +102,7 @@ func (s *LocalStorage) Purge(days time.Duration) (err error) { return nil } - if info.ModTime().After(time.Now().Add(-1 * days)) { + if info.ModTime().Before(time.Now().Add(-1 * days)) { err = os.Remove(path) return err }