mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Improve JSON API DirDetails handle type test
This commit is contained in:
parent
d6c4a086f3
commit
53f2891b78
@ -39,7 +39,15 @@ function tLog()
|
||||
echo "$mCategory $(date) $@" >&2
|
||||
}
|
||||
|
||||
mReply="$(curl -u "$API_TOKEN" "$API_BASE_URL/rsFiles/requestDirDetails")"
|
||||
mCmd="curl -u $API_TOKEN $API_BASE_URL/rsFiles/requestDirDetails"
|
||||
|
||||
mReply="$($mCmd)"
|
||||
mCurlRet="$?"
|
||||
|
||||
if [ "$mCurlRet" != 0 ]; then
|
||||
tLog E "$mCmd failed: $mCurlRet '$mReply'"
|
||||
exit -3
|
||||
fi
|
||||
|
||||
[ "$(echo "$mReply" | jq '.retval')" == "true" ] ||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user