Condor interface: when unzipping output file, use job-specific name for temp file to avoid conflict between jobs

This commit is contained in:
David Anderson 2014-03-13 13:07:16 -07:00
parent c2fd2b33e0
commit 12b4f43793
1 changed files with 4 additions and 2 deletions

View File

@ -447,7 +447,7 @@ void handle_fetch_output(COMMAND& c) {
if (zipped_output(td)) {
// the job's output file is a zip archive. Get it and unzip
//
sprintf(path, "%s/temp.zip", req.dir);
sprintf(path, "%s/%s_output.zip", req.dir, req.job_name);
retval = get_output_file(
project_url, authenticator, req.job_name, 0, path, error_msg
);
@ -455,10 +455,12 @@ void handle_fetch_output(COMMAND& c) {
sprintf(buf, "get_output_file()\\ returned\\ %d\\ ", retval);
s = string(buf) + escape_str(error_msg);
} else {
sprintf(buf, "cd %s; unzip temp.zip", req.dir);
sprintf(buf, "cd %s; unzip %s_output.zip", req.dir, req.job_name);
retval = system(buf);
if (retval) {
s = string("unzip\\ failed");
} else {
unlink(path);
}
}
} else if (req.fetch_all) {