diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-11-09 13:10:30 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-11-09 13:10:30 -0500 |
commit | 76d849e09077d1b3dbd5cad3fe296ca06e91119f (patch) | |
tree | b1dd970f3d81f0e320363eb79473fef2dab85c7c /shell | |
parent | f6d06681413db0efbbca189ddf6e5e7cd6217349 (diff) | |
download | mongo-76d849e09077d1b3dbd5cad3fe296ca06e91119f.tar.gz |
fix drop fallout
Diffstat (limited to 'shell')
-rw-r--r-- | shell/collection.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/collection.js b/shell/collection.js index 3e19e935459..50a24b1de5e 100644 --- a/shell/collection.js +++ b/shell/collection.js @@ -296,8 +296,12 @@ DBCollection.prototype.dropIndexes = function(){ DBCollection.prototype.drop = function(){ this.resetIndexCache(); var ret = this._db.runCommand( { drop: this.getName() } ); - if ( ! ret.ok ) + if ( ! ret.ok ){ + if ( ret.errmsg == "ns not found" ) + return false; throw "drop failed: " + tojson( ret ); + } + return true; } DBCollection.prototype.renameCollection = function( newName ){ |