提交 1dd76fd1 作者: Juan Batiz-Benet

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

catch other error that means the file is locked
...@@ -34,6 +34,9 @@ func Locked(confdir string) (bool, error) { ...@@ -34,6 +34,9 @@ func Locked(confdir string) (bool, error) {
if err == syscall.EAGAIN { if err == syscall.EAGAIN {
return true, nil return true, nil
} }
if strings.Contains(err.Error(), "can't Lock file") {
return true, nil
}
// lock fails on permissions error // lock fails on permissions error
if os.IsPermission(err) { if os.IsPermission(err) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论