diff --git a/lockfile_windows.go b/lockfile_windows.go index ed6c5c4b2b..77490b8513 100644 --- a/lockfile_windows.go +++ b/lockfile_windows.go @@ -9,18 +9,29 @@ import ( ) func getLockFile(path string, ro bool) (Locker, error) { - return &lockfile{}, nil + return &lockfile{locked: false}, nil } type lockfile struct { - mu sync.Mutex - file string + mu sync.Mutex + file string + locked bool } func (l *lockfile) Lock() { + l.mu.Lock() + l.locked = true } + func (l *lockfile) Unlock() { + l.locked = false + l.mu.Unlock() +} + +func (l *lockfile) Locked() bool { + return l.locked } + func (l *lockfile) Modified() (bool, error) { return false, nil }