diff --git a/daemon2/daemon.go b/daemon2/daemon.go index 4e5bd28d52ca8ffacdddfaabe89d4181b4fe71eb..04aade68c82027f8066cead5109f1711d7a60fdb 100644 --- a/daemon2/daemon.go +++ b/daemon2/daemon.go @@ -5,6 +5,7 @@ import ( "path" lock "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/camlistore/lock" + "github.com/jbenet/go-ipfs/util" ) // LockFile is the filename of the daemon lock, relative to config dir @@ -15,6 +16,9 @@ func Lock(confdir string) (io.Closer, error) { } func Locked(confdir string) bool { + if !util.FileExists(path.Join(confdir, LockFile)) { + return false + } if lk, err := Lock(confdir); err != nil { return true