summaryrefslogtreecommitdiff
path: root/util/mmap_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'util/mmap_win.cpp')
-rw-r--r--util/mmap_win.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/util/mmap_win.cpp b/util/mmap_win.cpp
index 942011bf7e6..7bafaf81f39 100644
--- a/util/mmap_win.cpp
+++ b/util/mmap_win.cpp
@@ -49,7 +49,19 @@ namespace mongo {
unsigned mapped = 0;
- void* MemoryMappedFile::map(const char *filename, int length) {
+ void* MemoryMappedFile::map(const char *_filename, int length) {
+ /* big hack here: Babble uses db names with colons. doesn't seem to work on windows. temporary perhaps. */
+ char filename[256];
+ strncpy(filename, _filename, 255);
+ filename[255] = 0;
+ {
+ char *p = filename;
+ while( *p ) {
+ if( *p == ':' ) *p = '_';
+ p++;
+ }
+ }
+
updateLength( filename, length );
std::wstring filenamew = toWideString(filename);