Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/download.gi
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ Add( Download_Methods, rec(
res:= ValueGlobal( "DownloadURL" )( url, opt );

if res.success = true and
IsBound( opt.target ) and IsString( opt.target ) then
IsBound( opt.target ) and IsString( opt.target ) and
IsBound( res.result ) then
# 'DownloadURL' ignored 'target' and returned the contents, so write
# them out here. A curlInterface that honours 'target' itself returns
# no 'result', and then the file was never held in memory at all.
FileString( opt.target, res.result );
Unbind( res.result );
fi;
Expand Down