repo: use OSTREE_TIMESTAMP (=1) for checked-out files
1 is a better choice than 0 because some programs use 0 as a special value; for example, GNU Tar warns of an "implausibly old timestamp" with 0. Closes: #330 Approved by: cgwalters
This commit is contained in:
1 parent
f94b191ae5
commit
0e9a875393
7 files changed
+35
-13
No files matched your search
@@ -752,12 +752,12 @@ checkout_tree_at (OstreeRepo *self,
|
||||
}
|
||||
}
|
||||
|
||||
/* Set directory mtime to 0, so that it is constant for all checkouts.
|
||||
/* Set directory mtime to OSTREE_TIMESTAMP, so that it is constant for all checkouts.
|
||||
* Must be done after setting permissions and creating all children.
|
||||
*/
|
||||
if (!did_exist)
|
||||
{
|
||||
const struct timespec times[2] = { { 0, UTIME_OMIT }, { 0, } };
|
||||
const struct timespec times[2] = { { OSTREE_TIMESTAMP, UTIME_OMIT }, { OSTREE_TIMESTAMP, 0} };
|
||||
do
|
||||
res = futimens (destination_dfd, times);
|
||||
while (G_UNLIKELY (res == -1 && errno == EINTR));
|
||||
|
||||
Reference in new issue
Block a user