summaryrefslogtreecommitdiffstats
path: root/src/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/download.c')
-rw-r--r--src/download.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/download.c b/src/download.c
index fab6bba..bd8a40f 100644
--- a/src/download.c
+++ b/src/download.c
@@ -135,7 +135,11 @@ int download_to_file(const char* url, const char* filename, int enable_progress)
curl_easy_perform(handle);
curl_easy_cleanup(handle);
+#ifdef WIN32
+ uint64_t sz = _ftelli64(f);
+#else
off_t sz = ftello(f);
+#endif
fclose(f);
if ((sz == 0) || (sz == (off_t)-1)) {