Update fsstore.go

This commit is contained in:
SenXuDC 2018-12-06 23:01:52 +08:00 committed by GitHub
parent 0351853ea1
commit 48c715515e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ func (s *fsStore) Exists(source checkpoint.RemoteConfigSource) (bool, error) {
func (s *fsStore) Save(payload checkpoint.Payload) error {
// Note: Payload interface guarantees UID() and ResourceVersion() to be non-empty
path := s.checkpointPath(payload.UID(), payload.ResourceVersion())
// ensure the parent dir (checkpoints/uid) exists, since ReplaceDir requires the parent of the replacee
// ensure the parent dir (checkpoints/uid) exists, since ReplaceDir requires the parent of the replace
// to exist, and we checkpoint as checkpoints/uid/resourceVersion/files-from-configmap
if err := utilfiles.EnsureDir(s.fs, filepath.Dir(path)); err != nil {
return err