Skip to content

Commit 1e86271

Browse files
committed
prevented creating non-existing project directory
1 parent 2a27e07 commit 1e86271

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

streamer/lib/modalityOPM.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) {
5353
"ses-opm" + job.data.session
5454
);
5555

56+
if ( ! fs.existsSync(path.join("/project", job.data.project)) ) {
57+
utility.printLog(job.id + ':OPM:execStreamerJob:copyToProjects', 'project storage not found: ' + job.data.project);
58+
job.progress(maxProgress, 100);
59+
return cb_async(null, true);
60+
}
61+
5662
// make sure dstDir exists
5763
fs.mkdirSync(dstDir, { recursive: true });
5864

0 commit comments

Comments
 (0)