mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
catch other error that means the file is locked
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user