summaryrefslogtreecommitdiff
path: root/db/db.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-12-31 16:27:08 -0500
committerEliot Horowitz <eliot@10gen.com>2009-12-31 16:27:08 -0500
commit578f1973eae0f310c58ff00955232b36f38ae24d (patch)
treee151c4a7c47a66ff8f81129a830b54bfafd167c5 /db/db.h
parente21bb90572611fc7dd79a3b373e37f2dee38cf06 (diff)
downloadmongo-578f1973eae0f310c58ff00955232b36f38ae24d.tar.gz
small opt
Diffstat (limited to 'db/db.h')
-rw-r--r--db/db.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/db.h b/db/db.h
index ba50e9df1f0..f3dff2154e2 100644
--- a/db/db.h
+++ b/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;