Skip to content

Commit

Permalink
fix(scorch): remove colons from generated filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
nblair2 authored and activeshadow committed Jul 25, 2024
1 parent 7b80f40 commit 60a13b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/go/api/scorch/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (this *Scorch) Running(ctx context.Context, exp *types.Experiment) error {
}

if _, err := os.Stat(runDir); err == nil {
archive := filepath.Join(exp.FilesDir(), fmt.Sprintf("scorch-run-%d_%s.tgz", runID, start.Format(time.RFC3339)))
archive := filepath.Join(exp.FilesDir(), fmt.Sprintf("scorch-run-%d_%s.tgz", runID, start.Format("2006-01-02T15-04-05Z0700")))

if err := util.CreateArchive(runDir, archive); err != nil {
errors = multierror.Append(errors, fmt.Errorf("archiving data generated for run %d: %w", runID, err))
Expand Down Expand Up @@ -364,7 +364,7 @@ func (this Scorch) recordInfo(runID int, runDir string, md store.ConfigMetadata,
mmVersion,
)

fileName := fmt.Sprintf("info-scorch-run-%d_%s.txt", runID, startTime.Format(time.RFC3339))
fileName := fmt.Sprintf("info-scorch-run-%d_%s.txt", runID, startTime.Format("2006-01-02T15-04-05Z0700"))

if err := os.MkdirAll(runDir, 0755); err != nil {
return fmt.Errorf("creating %s directory for scorch run %d: %w", runDir, runID, err)
Expand Down

0 comments on commit 60a13b7

Please sign in to comment.