Skip to content

Commit

Permalink
DM Lua: remove char** etag cache insanity.
Browse files Browse the repository at this point in the history
  • Loading branch information
torque committed Jan 23, 2016
1 parent 496d33e commit 2380101
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions threaded-libcurl/DownloadManager.moon
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ ffi.cdef [[
___INCLUDE___
int usleep(unsigned int);
void Sleep(unsigned long);
char *strdup(const char *);
char *_strdup(const char *);
]]

DMVersion = 0x000400
Expand All @@ -76,7 +74,7 @@ if libVer < DMVersion or math.floor(libVer/65536%256) > math.floor(DMVersion/655
error "Library version mismatch. Wanted #{DMVersion}, got #{libVer}."

sleep = ffi.os == "Windows" and (( ms = 100 ) -> ffi.C.Sleep ms) or (( ms = 100 ) -> ffi.C.usleep ms*1000)
strdup = ffi.os == "Windows" and ffi.C._strdup or ffi.C.strdup

sanitizeFile = ( filename, acceptDir ) ->
-- expand leading ~.
if homeDir = os.getenv "HOME"
Expand Down Expand Up @@ -195,11 +193,6 @@ class DownloadManager
else
sha1 = nil

cEtag = ffi.new "char*[1]"
if "string" == type etag
cEtag[0] = strdup etag
else
cEtag[0] = strdup ""

DM.addDownload @manager, url, outfile, sha1, cEtag
@downloadCount += 1
Expand Down

0 comments on commit 2380101

Please sign in to comment.