Close job temp file

This commit is contained in:
Michal Wieczorek 2016-09-04 23:55:35 +02:00
parent fc36626945
commit db685b164f
1 changed files with 4 additions and 0 deletions

View File

@ -255,6 +255,10 @@ func (j *JobGetter) StructJob(jpath string) (*structs.Job, error) {
}
defer os.Remove(job.Name())
if err := job.Close(); err != nil {
return nil, err
}
// Get the pwd
pwd, err := os.Getwd()
if err != nil {