Skip to content

Fix timestamp in compress.#12

Merged
saimizi merged 1 commit intosaimizi:mainfrom
JSeimizu:feature/fix-timestamp-issue
Nov 19, 2025
Merged

Fix timestamp in compress.#12
saimizi merged 1 commit intosaimizi:mainfrom
JSeimizu:feature/fix-timestamp-issue

Conversation

@JSeimizu
Copy link
Contributor

What's changed

When executing compound and collection compression, timestamp has been added twice for both tar and second compression. This PR remove the timestamp for the second compression.

Fixes #11

Copy link
Owner

@saimizi saimizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR fixes issue #11 by preventing duplicate timestamps in compound compression operations. The solution correctly disables the timestamp for the secondary compression step, ensuring timestamps only appear once in the final filename.

What works well:

  • The fix correctly addresses the root cause by setting TimestampOption::None for the secondary compression
  • Both compound.rs and collection.rs are updated consistently
  • The approach properly uses the builder pattern with with_timestamp() method
  • Changes are minimal and focused on the specific issue

Minor issue:

  • There's an incorrect comment in collection.rs line 121 that says "Preserve timestamp option" when it should say something like "Disable timestamp for secondary compression" (see inline comment)

Recommendation:

Approve with minor comment fix requested. The code logic is correct and solves the problem. Only the misleading comment needs to be corrected for clarity.

@JSeimizu JSeimizu force-pushed the feature/fix-timestamp-issue branch from caf3b07 to 6545d59 Compare November 19, 2025 07:07
@saimizi saimizi merged commit 7dd5544 into saimizi:main Nov 19, 2025
1 check passed
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.

Duplicated timestamp is added when compress

2 participants