mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
small opt
This commit is contained in:
parent
e21bb90572
commit
578f1973ea
2
db/db.h
2
db/db.h
@ -47,6 +47,8 @@ namespace mongo {
|
||||
|
||||
/* sometimes we deal with databases with the same name in different directories - thus this */
|
||||
inline string makeDbKeyStr( const char *ns, const string& path ) {
|
||||
if ( path == dbpath )
|
||||
return ns;
|
||||
char cl[256];
|
||||
nsToClient(ns, cl);
|
||||
return string( cl ) + ":" + path;
|
||||
|
Loading…
Reference in New Issue
Block a user