diff --git a/tasks/tasks.go b/tasks/tasks.go index 208734c6..d6693920 100644 --- a/tasks/tasks.go +++ b/tasks/tasks.go @@ -328,9 +328,9 @@ func (task *taskType) checkTransfer() error { if err != nil { return fmt.Errorf("marshalling manifest content: %s", err.Error()) } - var manifestFile *os.File - manifestFile, err = os.CreateTemp(config.Service.ManifestDirectory, - "manifest.json") + task.ManifestFile = filepath.Join(config.Service.ManifestDirectory, + fmt.Sprintf("manifest-%s.json", task.Id.String())) + manifestFile, err := os.Create(task.ManifestFile) if err != nil { return fmt.Errorf("creating manifest file: %s", err.Error()) } @@ -338,7 +338,6 @@ func (task *taskType) checkTransfer() error { if err != nil { return fmt.Errorf("writing manifest file content: %s", err.Error()) } - task.ManifestFile = manifestFile.Name() err = manifestFile.Close() if err != nil { return fmt.Errorf("closing manifest file: %s", err.Error())