diff --git a/lib/storage/file.js b/lib/storage/file.js index 60ff9dfc1..a60944771 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -392,7 +392,14 @@ var getDedicatedMetadata = function (env, channelId, handler, _cb) { readMore(); }, function (err) { // ENOENT => there is no metadata log - if (!err || err.code === 'ENOENT') { return void cb(); } + if (!err || err.code === 'ENOENT') { + if (err && err.code === 'ENOENT') { + return readPlaceholder(env, channelId, (content) => { + cb(content); + }); + } + return void cb(); + } // otherwise stream errors? cb(err); }); diff --git a/www/common/cryptget.js b/www/common/cryptget.js index afc93b53d..233fa9cd4 100644 --- a/www/common/cryptget.js +++ b/www/common/cryptget.js @@ -193,6 +193,11 @@ define([ finish(Session, void 0, doc); }); }; + + config.onChannelError = function (info) { + finish(Session, info); + }; + overwrite(config, opt); start(Session, config);