Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

davix-get writes empty file on failure #55

Open
jellykells opened this issue Nov 11, 2020 · 1 comment
Open

davix-get writes empty file on failure #55

jellykells opened this issue Nov 11, 2020 · 1 comment

Comments

@jellykells
Copy link

Consider the following case:

  1. Use davix-get to retrieve a file from a remote server.

  2. The retrieval is successful and the file is written. :)

  3. Use davix-get again to retrieve an updated version of the same file.

  4. The retrieval fails due to some error (e.g. name resolution failure), and the old file is overwritten with an empty file. :(

For some context, I use davix to synchronize SSL certificates between multiple remote computers. A temporary failure caused davix to overwrite the certificates with empty files, resulting in errors from the programs using those certificates.

@jellykells
Copy link
Author

One way this behavior can be worked around is by using a logical operator in bash:

davix-get [OPTIONS ...] <url> [temporary_file] && mv [temporary_file] [local_file]

But ideally davix-get wouldn't write the empty file at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant