Merge pull request #1295 from ipfs/fix/lock-check

catch other error that means the file is locked
This commit is contained in:
Juan Batiz-Benet 2015-05-30 13:38:50 -07:00
commit 1dd76fd162

View File

@ -34,6 +34,9 @@ func Locked(confdir string) (bool, error) {
if err == syscall.EAGAIN {
return true, nil
}
if strings.Contains(err.Error(), "can't Lock file") {
return true, nil
}
// lock fails on permissions error
if os.IsPermission(err) {