-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Update win_copy for #32677 #32682
Update win_copy for #32677 #32682
Conversation
enable large zip file support in win_copy
Does this actually work for you, by default the compression and allowZip64 are set to I never set I'll do some testing the background and see if t3hat is the case. Edit 1: Looks like since Python 3.4 |
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.
Have tested this with Python 2.6, 2.7 and 3.6 and it works properly. Once you've removed the compression setting I'm happy to merge it in.
@@ -233,7 +233,7 @@ def _create_content_tempfile(self, content): | |||
def _create_zip_tempfile(self, files, directories): | |||
tmpdir = tempfile.mkdtemp() | |||
zip_file_path = os.path.join(tmpdir, "win_copy.zip") | |||
zip_file = zipfile.ZipFile(zip_file_path, "w") | |||
zip_file = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED, True) |
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.
Can you change this to just set allowZip64=True
and not set the compression.
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.
Let me run a test here too; once that passes with your suggested setting, I will do a new commit. Stay tuned.
I ran some tests here with the ZIP_STORE setting rather than ZIP_DEFLATE and that works ok. Commited the ZIP_STORE setting. |
Errors are unrelated to the code changes, thanks for the fix @u625030. |
Fix cherry-picked to stable-2.4 612d9e0, will be in the 2.4.2rc1 release. |
SUMMARY
Fixes missing large file support in win_copy
Fixes: #32677
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
lib/ansible/plugins/action/win_copy.py
ANSIBLE VERSION
Stable-2.4