Commit c1f41497 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: don't add duplicate URL with the same CID

parent bfabe64e
......@@ -703,6 +703,11 @@ put_cid_and_url()
is_fileurl "$URL" && return
local ac="$(get_url_by_cid)"
if [ "$ac" = "$URL" ] ; then
info "CID $CID is already exist as the same URL $URL in IPFS DB, skipping"
return
fi
echo "$URL $CID $FN" >> "$EGET_IPFS_DB"
info "Placed in $EGET_IPFS_DB: $URL $CID $FN"
}
......
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