func (r *checkpointRegistry) runCheckpoints(checkpointBuilder *DirManifestBuilder) error {
	r.mu.Lock()
	defer r.mu.Unlock()

	for n, cp := range r.checkpoints {
		de, err := cp()
		if err != nil {
			return errors.Wrapf(err, "error checkpointing %v", n)
		}

		if de == nil {
			// no checkpoint.
			continue
		}

		if de.Type != snapshot.EntryTypeDirectory {
			de.Name = ".checkpointed." + de.Name + "." + uuid.New().String()
		}

		checkpointBuilder.AddEntry(de)
	}

	return nil
}
// runCheckpoints invokes all registered checkpointers and adds results to the provided builder, while
// randomizing file names for non-directory entries. this is to prevent the use of checkpointed objects
// as authoritative on subsequent runs.
runCheckpoints invokes all registered checkpointers and adds results to the provided builder, while
randomizing file names for non-directory entries. this is to prevent the use of checkpointed objects
as authoritative on subsequent runs.
// runCheckpoints invokes all registered checkpointers and adds results to the provided builder while // randomizing file names for non - directory entries . this is to prevent the use of checkpointed objects // as authoritative on subsequent runs .
func (r *checkpointRegistry) runCheckpoints(checkpointBuilder *DirManifestBuilder) error {
	r.mu.Lock()
	defer r.mu.Unlock()
	for n, cp := range r.checkpoints {
		de, err := cp()
		if err != nil {
			return errors.Wrapf(err, "error checkpointing %v", n)
		}
		if de == nil {
			continue
		}
		if de.Type != snapshot.EntryTypeDirectory {
			de.Name = ".checkpointed." + de.Name + "." + uuid.New().String()
		}
		checkpointBuilder.AddEntry(de)
	}
	return nil
}
func ( r * checkpointRegistry ) runCheckpoints ( checkpointBuilder * DirManifestBuilder ) error { r . mu . Lock ( ) defer r . mu . Unlock ( ) for n , cp := range r . checkpoints { de , err := cp ( ) if err != nil { return errors . Wrapf ( err , " " , n ) } if de == nil { continue } if de . Type != snapshot . EntryTypeDirectory { de . Name = " " + de . Name + " " + uuid . New ( ) . String ( ) } checkpointBuilder . AddEntry ( de ) } return nil }
runCheckpoints invokes all registered checkpointers and adds results to the provided builder, while
randomizing file names for non-directory entries.
runCheckpoints invokes all registered checkpointers and adds results to the provided builder while randomizing file names for non - directory entries .
// no checkpoint.