()
| 52 | } |
| 53 | |
| 54 | func (b *bisyncRun) removeLockFile() (err error) { |
| 55 | if b.lockFile != "" { |
| 56 | b.lockFileOpt.stopRenewal() |
| 57 | err = os.Remove(b.lockFile) |
| 58 | if err == nil { |
| 59 | fs.Debugf(nil, "Lock file removed: %s", b.lockFile) |
| 60 | } else { |
| 61 | fs.Errorf(nil, "cannot remove lockfile %s: %v", b.lockFile, err) |
| 62 | } |
| 63 | b.lockFile = "" // block removing it again |
| 64 | } |
| 65 | return err |
| 66 | } |
| 67 | |
| 68 | func (b *bisyncRun) setLockFileExpiration() { |
| 69 | if b.opt.MaxLock > 0 && b.opt.MaxLock < fs.Duration(2*time.Minute) { |