/*
goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2023 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
CleanupFull = "full"
CleanupLog = "log"
CleanupTmp = "tmp"
+ CleanupLock = "lock"
)
var DryRun *bool
}
}
}
+ case CleanupLock:
+ if strings.HasSuffix(fi.Name(), LockSuffix) {
+ fmt.Println(pth)
+ if !*DryRun {
+ if err = os.Remove(pth); err != nil {
+ return err
+ }
+ }
+ }
case CleanupTmp:
if strings.HasPrefix(fi.Name(), TmpPrefix) {
fmt.Println(pth)