With file(DOWNLOAD, you should always use the EXPECTED_MD5 argument (or EXPECTED_HASH with nightly CMake, or 2.8.10 or later) to verify success.<br><br>HTH,<div>David</div><div><br></div><div><br><div class="gmail_quote">On Wed, Sep 26, 2012 at 5:40 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm using the file( DOWNLOAD ) command to download some files from an<br>
FTP server. I notice that if I put a completely invalid URL to a<br>
file, the destination file is still created in Windows with a size of<br>
0 bytes. This tricks my logic into thinking the download was<br>
successful (since I only check if the destination file exists). Is<br>
this a bug or a feature? If it's a feature, what is a reliable way I<br>
can determine if the download succeeded?<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>