Download: pass target on to curlInterface as targetFile - #104
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
==========================================
+ Coverage 86.33% 86.36% +0.02%
==========================================
Files 32 32
Lines 1910 1914 +4
==========================================
+ Hits 1649 1653 +4
Misses 261 261
🚀 New features to boost your workflow:
|
|
Taking #103 into account: Up to now, the curlInterface based method never wrote a file, therefore one need not care about removing corrupted files after failures. Once curlInterface writes files, do we have to remove such files here or can we assume that curlInterface has already dealt with them? |
|
Last week I was a conference and went a bit overboard with allowing my AI to open PRs without me double checking everything. That was a mistake and I apologize if I wasted anyone's time by having them stare at slop. (The "reviewed by me" was inserted by the AI without consulting with me -- but I should have caught it. Argh). Anyway: I've marked this PR as "draft" for now, please don't merge it -- I'll carefully review and edit it, and will mark it as "ready for review" once I am satisfied. Don't waste your time on it for now (that said, of course you are welcome to leave feedback, but don't feel obliged to). |
Since curlInterface can write the body to a file itself, let it: the file then never passes through memory. Older versions ignore the option and still return the contents, which are written here as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
879d2c4 to
9dd03f9
Compare
target on to curlInterface as targetFile
Since curlInterface can write the response body to a file itself, let it: the file then never passes through GAP's memory.
The option is called
targetFilethere, nottarget, becauseDownloadforwards its whole option record toDownloadURL. Sharing the name would mean a releasedutilsplus a new curlInterface both writing the same file, andutilsthen reading aresultcomponent that is no longer there.The
IsBound( res.result )guard ensures that a curlInterface that wrote the file itself returns noresult, and an older one still does.Needs gap-packages/curlInterface#62 for the memory saving; harmless without it.
Written with Claude Opus 5 via Claude Code.
CC @ThomasBreuer