-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from tri-adam/deterministic
fix: non-deterministic timestamp behaviour
- Loading branch information
Showing
7 changed files
with
83 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (c) 2018-2022, Sylabs Inc. All rights reserved. | ||
// Copyright (c) 2018-2023, Sylabs Inc. All rights reserved. | ||
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved. | ||
// Copyright (c) 2017, Yannick Cote <[email protected]> All rights reserved. | ||
// This software is licensed under a 3-clause BSD license. Please consult the | ||
|
@@ -402,3 +402,9 @@ func (f *FileImage) DataSize() int64 { return f.h.DataSize } | |
func (f *FileImage) GetHeaderIntegrityReader() io.Reader { | ||
return f.h.GetIntegrityReader() | ||
} | ||
|
||
// isDeterministic returns true if the UUID and timestamps in the header of f are set to | ||
// deterministic values. | ||
func (f *FileImage) isDeterministic() bool { | ||
return f.h.ID == uuid.Nil && f.CreatedAt().IsZero() && f.ModifiedAt().IsZero() | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.