diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-08-10 18:11:42 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-08-10 18:32:11 -0400 |
commit | f9dc7514f4132f6fa5fa695b688aeafb4e63040e (patch) | |
tree | bf2eed20d015e7adf9de25dc45d81e85de16c106 /src/mongo/db/dur_recover.cpp | |
parent | 572d39f494ea5aa292c03e24c793875a9b059c63 (diff) | |
download | mongo-f9dc7514f4132f6fa5fa695b688aeafb4e63040e.tar.gz |
Fix dur::fileName()
Diffstat (limited to 'src/mongo/db/dur_recover.cpp')
-rw-r--r-- | src/mongo/db/dur_recover.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/dur_recover.cpp b/src/mongo/db/dur_recover.cpp index 1d21fe0bb79..07d605ce16e 100644 --- a/src/mongo/db/dur_recover.cpp +++ b/src/mongo/db/dur_recover.cpp @@ -187,11 +187,16 @@ namespace mongo { StackStringBuilder ss; ss << full.string(); + #ifdef _WIN32 - ss << '\\'; + static const char pathSep = '\\'; #else - ss << '/'; + static const char pathSep = '/'; #endif + + if (!dbpath.empty() && dbpath[dbpath.size()-1] != pathSep) + ss << pathSep; + ss << dbName << '.'; verify( fileNo >= 0 ); |