Skip to content

Commit

Permalink
Unify mtime constant used on Unix and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaput committed Nov 13, 2023
1 parent 3474445 commit 7bd8318
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/header.rs
Expand Up @@ -825,7 +825,7 @@ impl Header {
HeaderMode::Deterministic => {
self.set_uid(0);
self.set_gid(0);
self.set_mtime(123456789); // see above in unix
self.set_mtime(1153704088); // see above in unix
let fs_mode = if meta.is_dir() { 0o755 } else { 0o644 };
self.set_mode(fs_mode);
}
Expand Down
1 change: 1 addition & 0 deletions tests/header/mod.rs
Expand Up @@ -204,6 +204,7 @@ fn set_metadata_deterministic() {

// Would not match without `Deterministic`.
assert_eq!(t!(one.mtime()), t!(two.mtime()));
assert_eq!(t!(one.mtime()), 1153704088);
// TODO: No great way to validate that these would not be filled, but
// check them anyway.
assert_eq!(t!(one.uid()), t!(two.uid()));
Expand Down

0 comments on commit 7bd8318

Please sign in to comment.