File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -183,29 +183,18 @@ namespace mongo {
183183 };
184184
185185 static string fileName (const char * dbName, int fileNo) {
186- boost::filesystem::path full (dbpath);
187-
188- StackStringBuilder ss;
189- ss << full.string ();
190-
191- #ifdef _WIN32
192- static const char pathSep = ' \\ ' ;
193- #else
194- static const char pathSep = ' /' ;
195- #endif
196-
197- if (!dbpath.empty () && dbpath[dbpath.size ()-1 ] != pathSep)
198- ss << pathSep;
199-
186+ stringstream ss;
200187 ss << dbName << ' .' ;
201188 verify ( fileNo >= 0 );
202-
203189 if ( fileNo == JEntry::DotNsSuffix )
204190 ss << " ns" ;
205191 else
206192 ss << fileNo;
207193
208- return ss.str ();
194+ // relative name -> full path name
195+ boost::filesystem::path full (dbpath);
196+ full /= ss.str ();
197+ return full.string ();
209198 }
210199
211200 RecoveryJob::~RecoveryJob () {
You can’t perform that action at this time.
0 commit comments