summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-11-09 13:10:30 -0500
committerEliot Horowitz <eliot@10gen.com>2009-11-09 13:10:30 -0500
commit76d849e09077d1b3dbd5cad3fe296ca06e91119f (patch)
treeb1dd970f3d81f0e320363eb79473fef2dab85c7c /shell
parentf6d06681413db0efbbca189ddf6e5e7cd6217349 (diff)
downloadmongo-76d849e09077d1b3dbd5cad3fe296ca06e91119f.tar.gz
fix drop fallout
Diffstat (limited to 'shell')
-rw-r--r--shell/collection.js6
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 ){