mirror of
https://github.com/nxshock/simplefileshare.git
synced 2024-11-27 03:11:01 +05:00
Remove unused variable
This commit is contained in:
parent
c2cbf59793
commit
09463c3b24
@ -8,12 +8,12 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func removeOldFilesThread(path string, olderThan time.Duration) {
|
||||
func removeOldFilesThread(olderThan time.Duration) {
|
||||
ticker := time.NewTicker(time.Hour)
|
||||
|
||||
for range ticker.C {
|
||||
log.Debugln("Removing old files...")
|
||||
err := removeOldFiles(path, olderThan)
|
||||
err := removeOldFiles(olderThan)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
@ -21,7 +21,7 @@ func removeOldFilesThread(path string, olderThan time.Duration) {
|
||||
}
|
||||
}
|
||||
|
||||
func removeOldFiles(path string, olderThan time.Duration) error {
|
||||
func removeOldFiles(olderThan time.Duration) error {
|
||||
return filepath.Walk(config.StoragePath, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user