Skip to content

Commit d7e6c20

Browse files
committed
COMP: Update w3 gateway CID identification
w3 now has its own gateway, w3s.link. This now make the ExternalData.cmake consistent with https://github.com/InsightSoftwareConsortium/CMakeIPFSExternalData commit 951850d4609170d5d763143b3c142c980da32702.
1 parent a00eb39 commit d7e6c20

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CMake/ExternalData.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ function(_ExternalData_compute_hash var_hash algo file)
537537
if(NOT ${w3_put_result} EQUAL 0)
538538
message(FATAL_ERROR "Error while calling 'w3 put': ${w3_put_error}")
539539
endif()
540-
string(FIND "${w3_put_output}" "https://dweb.link/ipfs/" dweb_loc)
541-
math(EXPR cid_loc "${dweb_loc} + 23")
540+
string(FIND "${w3_put_output}" "https://w3s.link/ipfs/" w3s_loc)
541+
math(EXPR cid_loc "${w3s_loc} + 22")
542542
string(SUBSTRING "${w3_put_output}" ${cid_loc} -1 w3_cid)
543543
set("${var_hash}" "${w3_cid}" PARENT_SCOPE)
544544
elseif("${algo}" MATCHES "^${_ExternalData_REGEX_ALGO}$")
@@ -1126,10 +1126,10 @@ if("${ExternalData_ACTION}" STREQUAL "fetch")
11261126
string(REPLACE "+" ";" exts_list "${exts}")
11271127
set(succeeded 0)
11281128
set(errorMsg "")
1129-
set(hash_list)
1130-
set(algo_list)
1131-
set(hash)
1132-
set(algo)
1129+
set(hash_list )
1130+
set(algo_list )
1131+
set(hash )
1132+
set(algo )
11331133
foreach(ext ${exts_list})
11341134
file(READ "${name}${ext}" hash)
11351135
string(STRIP "${hash}" hash)

0 commit comments

Comments
 (0)