]> git.lizzy.rs Git - go-anidb.git/commitdiff
anidb: Fix compilation of flock_other
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Sun, 14 Jul 2013 04:54:46 +0000 (01:54 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Sun, 14 Jul 2013 04:54:46 +0000 (01:54 -0300)
Also fixes inverted if test.

flock_other.go

index 2250a1932d2cf0d9203c13892f0dbe272a5c36c5..bf275a2b65bea0ecf831112147a81f65c1be68ab 100644 (file)
@@ -8,9 +8,9 @@ type flockLock struct {
        locking.FLock
 }
 
-func lockFile(p path) fileLock {
+func lockFile(p string) fileLock {
        flock, err := locking.NewFLock(p)
-       if err != nil {
+       if err == nil {
                return &flockLock{FLock: flock}
        }
        return nil