pass flow tests
This commit is contained in:
parent
e56d762409
commit
5b21911341
7
rpc.js
7
rpc.js
@ -992,6 +992,9 @@ var owned_upload_complete = function (Env, safeKey, cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var oldPath = makeFilePath(Env.paths.staging, safeKey);
|
var oldPath = makeFilePath(Env.paths.staging, safeKey);
|
||||||
|
if (typeof(oldPath) !== 'string') {
|
||||||
|
return void cb('EINVAL_CONFIG');
|
||||||
|
}
|
||||||
|
|
||||||
// construct relevant paths
|
// construct relevant paths
|
||||||
var root = Env.paths.staging;
|
var root = Env.paths.staging;
|
||||||
@ -1054,6 +1057,9 @@ var owned_upload_complete = function (Env, safeKey, cb) {
|
|||||||
}));
|
}));
|
||||||
}).nThen(function (w) {
|
}).nThen(function (w) {
|
||||||
// move the existing file to its new path
|
// move the existing file to its new path
|
||||||
|
|
||||||
|
// flow is dumb and I need to guard against this which will never happen
|
||||||
|
/*:: if (typeof(oldPath) === 'object') { throw new Error('should never happen'); } */
|
||||||
Fs.rename(oldPath /* XXX */, finalPath, w(function (e) {
|
Fs.rename(oldPath /* XXX */, finalPath, w(function (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
w.abort();
|
w.abort();
|
||||||
@ -1217,7 +1223,6 @@ RPC.create = function (
|
|||||||
var pinPath = paths.pin = keyOrDefaultString('pinPath', './pins');
|
var pinPath = paths.pin = keyOrDefaultString('pinPath', './pins');
|
||||||
var blobPath = paths.blob = keyOrDefaultString('blobPath', './blob');
|
var blobPath = paths.blob = keyOrDefaultString('blobPath', './blob');
|
||||||
var blobStagingPath = paths.staging = keyOrDefaultString('blobStagingPath', './blobstage');
|
var blobStagingPath = paths.staging = keyOrDefaultString('blobStagingPath', './blobstage');
|
||||||
console.log(blobStagingPath);
|
|
||||||
|
|
||||||
var isUnauthenticateMessage = function (msg) {
|
var isUnauthenticateMessage = function (msg) {
|
||||||
return msg && msg.length === 2 && isUnauthenticatedCall(msg[0]);
|
return msg && msg.length === 2 && isUnauthenticatedCall(msg[0]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user