mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-29 15:40:19 +01:00
fix bug in purge for local storage
This commit is contained in:
parent
1abc7cfb0e
commit
7cf688e86e
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import (
|
||||||
"google.golang.org/api/googleapi"
|
"google.golang.org/api/googleapi"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "1.2.0"
|
var Version = "1.2.1"
|
||||||
var helpTemplate = `NAME:
|
var helpTemplate = `NAME:
|
||||||
{{.Name}} - {{.Usage}}
|
{{.Name}} - {{.Usage}}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ func (s *LocalStorage) Purge(days time.Duration) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if info.ModTime().After(time.Now().Add(-1 * days)) {
|
if info.ModTime().Before(time.Now().Add(-1 * days)) {
|
||||||
err = os.Remove(path)
|
err = os.Remove(path)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue