MCPcopy Create free account
hub / github.com/rclone/rclone / removeLockFile

Method removeLockFile

cmd/bisync/lockfile.go:54–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (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
68func (b *bisyncRun) setLockFileExpiration() {
69 if b.opt.MaxLock > 0 && b.opt.MaxLock < fs.Duration(2*time.Minute) {

Callers 1

BisyncFunction · 0.95

Calls 3

DebugfFunction · 0.92
ErrorfFunction · 0.92
RemoveMethod · 0.65

Tested by

no test coverage detected