Closed thebwt closed 8 years ago
I was able to make some progress on this in the raw rendered javascript. (this is around line 414 in my promseSftp.js file)
var addMkdirJob = function (newPath) {
return _this.mkdir(newPath, false, attributes)
}
result = result.then(addMkdirJob(currPath))["catch"](function(err) {
if (err.code !== ERROR_CODES.FAILURE && err.code !== ERROR_CODES.FILE_ALREADY_EXISTS) {
throw err;
}
});
That allows the path to get set in the correct scope. Now I'll start looking at a way to get it working with coffeescript
With that, the fix should be implemented.
Thanks for the contribution!
No problemo, was a good intro to javascript/coffee script
I'm very new to all of this, but we need to get a copy of currPath at .then()'s first call time. Not currPath when everything is ready to be run.