diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-12 19:50:48 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-12 19:50:48 +0000 |
commit | 1b4212881d632586c76bd40aa31ca1941cbee43b (patch) | |
tree | 13569a1b703f5569ae6615c1ba60ea6be870a6c4 /cmake | |
parent | 88f4064d8c3ac0d395f4ef3f50da9ab117072a56 (diff) | |
download | navit-1b4212881d632586c76bd40aa31ca1941cbee43b.tar.gz |
Fix:maps:Report map download error, and remove partial download
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5098 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/navit_download.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/navit_download.cmake b/cmake/navit_download.cmake index 963f9724f..6f6cc8f51 100644 --- a/cmake/navit_download.cmake +++ b/cmake/navit_download.cmake @@ -1,2 +1,8 @@ message("Downloading ${URL}") -file(DOWNLOAD ${URL} ${DST} SHOW_PROGRESS) +file(DOWNLOAD ${URL} ${DST} SHOW_PROGRESS STATUS DOWNLOAD_STATUS) +list(GET DOWNLOAD_STATUS 0 DOWNLOAD_ERR) +list(GET DOWNLOAD_STATUS 1 DOWNLOAD_MSG) +if(DOWNLOAD_ERR) + message(WARNING "Download of sample map from ${URL} failed: ${DOWNLOAD_MSG}.") + file(REMOVE ${DST}) +endif(DOWNLOAD_ERR) |