mirror of https://github.com/perkeep/perkeep.git
lock: fix Windows build
Change-Id: I1bf2552ca138e57217f81bf452ffdb8071596e99
This commit is contained in:
parent
6d761897db
commit
3c3009a270
|
@ -131,6 +131,11 @@ func (lc *lockCloser) close() {
|
|||
}
|
||||
}
|
||||
|
||||
var (
|
||||
lockmu sync.Mutex
|
||||
locked = map[string]bool{} // abs path -> true
|
||||
)
|
||||
|
||||
// unlocker is used by the darwin and linux implementations with fcntl
|
||||
// advisory locks.
|
||||
type unlocker struct {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -33,11 +32,6 @@ func init() {
|
|||
lockFn = lockFcntl
|
||||
}
|
||||
|
||||
var (
|
||||
lockmu sync.Mutex
|
||||
locked = map[string]bool{}
|
||||
)
|
||||
|
||||
func lockFcntl(name string) (io.Closer, error) {
|
||||
abs, err := filepath.Abs(name)
|
||||
if err != nil {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -33,11 +32,6 @@ func init() {
|
|||
lockFn = lockFcntl
|
||||
}
|
||||
|
||||
var (
|
||||
lockmu sync.Mutex
|
||||
locked = map[string]bool{}
|
||||
)
|
||||
|
||||
func lockFcntl(name string) (io.Closer, error) {
|
||||
abs, err := filepath.Abs(name)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue