summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.h
diff options
context:
space:
mode:
authordaveh86 <howsdav@gmail.com>2015-05-11 13:08:12 +1000
committerdaveh86 <howsdav@gmail.com>2015-05-11 13:08:12 +1000
commite45ec68181c5d27074c75be6627f9660f75cf484 (patch)
tree5c62d3b000d7a647340cd85148f0a63b4423db16 /src/mongo/db/namespace_string.h
parente06508fe119710ca06ee06504e0a33163af0708f (diff)
downloadmongo-e45ec68181c5d27074c75be6627f9660f75cf484.tar.gz
SERVER-16741 Add escape sequence to directoryperdb paths in KV Store
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r--src/mongo/db/namespace_string.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h
index 72f357f13c3..655dbf68a73 100644
--- a/src/mongo/db/namespace_string.h
+++ b/src/mongo/db/namespace_string.h
@@ -145,6 +145,11 @@ namespace mongo {
std::string getCommandNS() const;
/**
+ * Function to escape most non-alpha characters from file names
+ */
+ static std::string escapeDbName( const StringData dbname );
+
+ /**
* @return true if ns is 'normal'. A "$" is used for namespaces holding index data,
* which do not contain BSON objects in their records. ("oplog.$main" is the exception)
*/