diff --git a/db/database.cpp b/db/database.cpp index 7b47cd4e516..5b617bba141 100644 --- a/db/database.cpp +++ b/db/database.cpp @@ -284,13 +284,6 @@ namespace mongo { return true; } - bool Database::validDBName( const string& ns ) { - if ( ns.size() == 0 || ns.size() > 64 ) - return false; - size_t good = strcspn( ns.c_str() , "/\\. \"" ); - return good == ns.size(); - } - void Database::flushFiles( bool sync ) const { dbMutex.assertAtLeastReadLocked(); for ( unsigned i=0; i 64 ) + return false; + size_t good = strcspn( db.c_str() , "/\\. \"" ); + return good == db.size(); + } + private: void init(const char *ns) { const char *p = strchr(ns, '.');