ExternalData: Improve error message when we fail to create a file

Report the underlying system error.
This commit is contained in:
Brad King
2021-04-22 13:06:11 -04:00
parent 3a7ee5358b
commit 298760661f
+1 -1
View File
@@ -949,7 +949,7 @@ function(_ExternalData_link_or_copy src dst)
endif()
if(result)
file(REMOVE "${tmp}")
message(FATAL_ERROR "Failed to create\n ${tmp}\nfrom\n ${obj}")
message(FATAL_ERROR "Failed to create:\n \"${tmp}\"\nfrom:\n \"${obj}\"\nwith error:\n ${result}")
endif()
# Atomically create/replace the real destination.