From 6f4a86db7e691135505268ddb0626b8f6f9593e0 Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sat, 2 Sep 2023 11:16:17 +0200 Subject: [PATCH] COMMON: Add a native directory separator This will be used when converting the Path back to string to be used by native filesystem APIs --- common/path.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/path.h b/common/path.h index afbceb4f9f3..151086a0a6c 100644 --- a/common/path.h +++ b/common/path.h @@ -188,6 +188,16 @@ public: */ static const char kNoSeparator = '\x00'; + /** + * The platform native separator. + * This is used when accessing files on disk + */ +#if defined(WIN32) + static const char kNativeSeparator = '\\'; +#else + static const char kNativeSeparator = '/'; +#endif + /** * Hash and comparator for Path with following changes: * * case-insensitive