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

Fix CreateRaw() flags and timestamps #37

Merged
merged 1 commit into from
Mar 3, 2022
Merged

Conversation

saracen
Copy link
Owner

@saracen saracen commented Mar 3, 2022

When the standard Go library's version of CreateRaw was added, rather than solely focus on custom compression in "raw" mode, it also removed the convenience of setting up common zip flags and timestamp logic.

This change duplicates some functions from archive/zip to add the flags and timestamp logic to CreateRaw().

This fixes an issue raised by a user of GitLab-Runner https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28928 where timestamps were missing whenever CreateRaw was used.

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2022

Codecov Report

Merging #37 (f81e364) into main (998be6b) will decrease coverage by 0.26%.
The diff coverage is 77.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
- Coverage   77.77%   77.51%   -0.27%     
==========================================
  Files          11        9       -2     
  Lines         693      716      +23     
==========================================
+ Hits          539      555      +16     
- Misses        108      114       +6     
- Partials       46       47       +1     
Impacted Files Coverage Δ
archiver.go 78.18% <77.50%> (-0.25%) ⬇️
extractor_windows.go
archiver_windows.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 998be6b...f81e364. Read the comment docs.

@saracen saracen force-pushed the fix-create-raw-flags-mod-time branch from 02da18a to c24a6e9 Compare March 3, 2022 12:52
@saracen saracen merged commit 974c669 into main Mar 3, 2022
@saracen saracen deleted the fix-create-raw-flags-mod-time branch March 3, 2022 14:49
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

Successfully merging this pull request may close these issues.

2 participants