|
|
|
@ -204,14 +204,12 @@ var tryId = function (path, cb) {
|
|
|
|
|
Fs.access(path, Fs.constants.R_OK | Fs.constants.W_OK, function (e) {
|
|
|
|
|
if (!e) {
|
|
|
|
|
// generate a new id (with the same prefix) and recurse
|
|
|
|
|
//WARN('ownedUploadComplete', 'id is already used '+ id);
|
|
|
|
|
return void cb('EEXISTS');
|
|
|
|
|
} else if (e.code === 'ENOENT') {
|
|
|
|
|
// no entry, so it's safe for us to proceed
|
|
|
|
|
return void cb();
|
|
|
|
|
} else {
|
|
|
|
|
// it failed in an unexpected way. log it
|
|
|
|
|
//WARN('ownedUploadComplete', e);
|
|
|
|
|
return void cb(e.code);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -229,7 +227,6 @@ var owned_upload_complete = function (Env, safeKey, id, cb) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isValidId(id)) {
|
|
|
|
|
//WARN('ownedUploadComplete', "id is invalid");
|
|
|
|
|
return void cb('EINVAL_ID');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|