Commit 731dc91c authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: get_cid_by_url(): return only correct CID

parent d9c4d123
......@@ -568,7 +568,7 @@ get_cid_by_url()
local URL="$1"
[ -r "$EGET_IPFS_DB" ] || return
is_fileurl "$URL" && return 1
grep -F "$URL Qm" "$EGET_IPFS_DB" | head -n1 | cut -f2 -d" "
grep -F "$URL Qm" "$EGET_IPFS_DB" | cut -f2 -d" " | grep -E "Qm[[:alnum:]]{44}" | head -n1
}
put_cid_and_url()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment