Skip to content

Commit

Permalink
prevented creating non-existing project directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hurngchunlee committed Oct 17, 2024
1 parent 2a27e07 commit 1e86271
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions streamer/lib/modalityOPM.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) {
"ses-opm" + job.data.session
);

if ( ! fs.existsSync(path.join("/project", job.data.project)) ) {
utility.printLog(job.id + ':OPM:execStreamerJob:copyToProjects', 'project storage not found: ' + job.data.project);
job.progress(maxProgress, 100);
return cb_async(null, true);
}

// make sure dstDir exists
fs.mkdirSync(dstDir, { recursive: true });

Expand Down

0 comments on commit 1e86271

Please sign in to comment.