kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Allow /task/new/init to be called multiple times with same set-uuid
rodzic
938b13f21f
commit
4a0adcd883
|
@ -187,11 +187,10 @@ module.exports = {
|
||||||
},
|
},
|
||||||
cb => {
|
cb => {
|
||||||
fs.stat(srcPath, (err, stat) => {
|
fs.stat(srcPath, (err, stat) => {
|
||||||
if (err && err.code === 'ENOENT') cb();
|
if (err && err.code === 'ENOENT') fs.mkdir(srcPath, undefined, cb);
|
||||||
else cb(new Error(`Directory exists (should not have happened)`));
|
else cb(); // Dir already exists
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cb => fs.mkdir(srcPath, undefined, cb),
|
|
||||||
cb => {
|
cb => {
|
||||||
fs.writeFile(bodyFile, JSON.stringify(req.body), {encoding: 'utf8'}, cb);
|
fs.writeFile(bodyFile, JSON.stringify(req.body), {encoding: 'utf8'}, cb);
|
||||||
},
|
},
|
||||||
|
|
Ładowanie…
Reference in New Issue