-
Notifications
You must be signed in to change notification settings - Fork 31
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
resmgr: properly implement --overwrite, fix #690 #797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be simpler to just rmtree(fpath)
after resource_manager.download
's L251 if fpath.exists() and not overwrite:
?
Simpler, yes, but I thought it would be less surprising if the |
I can only see downloading via But even if you are planning on streamlining this into |
9bc3aed Now it is done at the first |
Until now, the
ocrd resmgr download --overwrite
flag only had an effect if it was not set: Download would abort because the file already exists.This PR adds an
overwrite
kwarg to the different methods handling download/copying/extraction. When set, the target directory/file are removed if they exist before data is written.