bugfix: updatedAt timestamp file may be empty
Signed-off-by: Michael Wan <zirenwan@gmail.com>
This commit is contained in:
@@ -33,6 +33,8 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/filters"
|
||||
"github.com/containerd/containerd/log"
|
||||
|
||||
"github.com/containerd/continuity"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
@@ -651,5 +653,5 @@ func writeTimestampFile(p string, t time.Time) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(p, b, 0666)
|
||||
return continuity.AtomicWriteFile(p, b, 0666)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user