mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 00:13:49 +01:00
protondrive: handle the empty credential case when reading from the config cache
This commit is contained in:
parent
77f7bb08af
commit
d01d57e62f
@ -271,18 +271,34 @@ func getConfigMap(m configmap.Mapper) (uid, accessToken, refreshToken, saltedKey
|
|||||||
if accessToken, ok = m.Get(clientAccessTokenKey); !ok {
|
if accessToken, ok = m.Get(clientAccessTokenKey); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(accessToken) == 0 {
|
||||||
|
ok = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if uid, ok = m.Get(clientUIDKey); !ok {
|
if uid, ok = m.Get(clientUIDKey); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(uid) == 0 {
|
||||||
|
ok = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if refreshToken, ok = m.Get(clientRefreshTokenKey); !ok {
|
if refreshToken, ok = m.Get(clientRefreshTokenKey); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(refreshToken) == 0 {
|
||||||
|
ok = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if saltedKeyPass, ok = m.Get(clientSaltedKeyPassKey); !ok {
|
if saltedKeyPass, ok = m.Get(clientSaltedKeyPassKey); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(saltedKeyPass) == 0 {
|
||||||
|
ok = false
|
||||||
|
return
|
||||||
|
}
|
||||||
_saltedKeyPass = saltedKeyPass
|
_saltedKeyPass = saltedKeyPass
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user