mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Give better error message when rebuildPad.js hits a non-existing rev.
This commit is contained in:
parent
a09044a6f3
commit
c9924ee706
1 changed files with 3 additions and 0 deletions
|
@ -79,6 +79,9 @@ async.series([
|
|||
newPad.pool.numToAttrib = oldPad.pool.numToAttrib;
|
||||
for(var curRevNum = 0; curRevNum <= newRevHead; curRevNum++) {
|
||||
db.db.get("pad:" + padId + ":revs:" + curRevNum, function(err, rev) {
|
||||
if (rev.meta) {
|
||||
throw "The specified revision number could not be found.";
|
||||
}
|
||||
var newRevNum = ++newPad.head;
|
||||
var newRevId = "pad:" + newPad.id + ":revs:" + newRevNum;
|
||||
db.db.set(newRevId, rev);
|
||||
|
|
Loading…
Reference in a new issue