Skip to content

Commit f9dc751

Browse files
committed
Fix dur::fileName()
1 parent 572d39f commit f9dc751

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/mongo/db/dur_recover.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,16 @@ namespace mongo {
187187

188188
StackStringBuilder ss;
189189
ss << full.string();
190+
190191
#ifdef _WIN32
191-
ss << '\\';
192+
static const char pathSep = '\\';
192193
#else
193-
ss << '/';
194+
static const char pathSep = '/';
194195
#endif
196+
197+
if (!dbpath.empty() && dbpath[dbpath.size()-1] != pathSep)
198+
ss << pathSep;
199+
195200
ss << dbName << '.';
196201
verify( fileNo >= 0 );
197202

0 commit comments

Comments
 (0)