GithubHelp home page GithubHelp logo

does not create empty files with -o about curl HOT 7 CLOSED

curl avatar curl commented on April 27, 2024
does not create empty files with -o

from curl.

Comments (7)

bagder avatar bagder commented on April 27, 2024

It certainly works like this on purpose, it is not a mistake. The documentation should probably be clarified to make this less surprising.

The idea is to not create a file in case of errors so it creates the file on demand when the first data arrives. But if no data ever arrives...

from curl.

joeyh avatar joeyh commented on April 27, 2024

Daniel Stenberg wrote:

It certainly works like this on purpose, it is not a mistake. The documentation
should probably be clarified to make this less surprising.

The idea is to not create a file in case of errors so it creates the file on
demand when the first data arrives. But if no data ever arrives...

Seems like you could create the file once the data transfer is complete,
if it's not been created already on demand. I think that would be better
than documenting a complicating special case.

see shy jo

from curl.

kdudka avatar kdudka commented on April 27, 2024

The current behavior sounds counter-intuitive to me, too. I would expect that successful download of a remote empty file results in a local empty file.

from curl.

bagder avatar bagder commented on April 27, 2024

I wouldn't mind having it create the file if it ends successfully!

from curl.

bagder avatar bagder commented on April 27, 2024

@joeyh feel like making a patch for it?

from curl.

kdudka avatar kdudka commented on April 27, 2024

I have proposed a patch for this on the mailing-list:

http://thread.gmane.org/gmane.comp.web.curl.library/45327/focus=45328

from curl.

kdudka avatar kdudka commented on April 27, 2024

I have merged the fix for this issue: a9e4674...992a731

from curl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.