From 8e26b709eada66f4a294aa77c9d61b2d0a721f94 Mon Sep 17 00:00:00 2001 From: Carlos Espa Date: Sat, 4 Nov 2023 20:55:55 +0100 Subject: [PATCH] WIP --- src/util.cc | 2 +- src/util.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util.cc b/src/util.cc index b3f336268723c6..b0a68c4b16b8fe 100644 --- a/src/util.cc +++ b/src/util.cc @@ -670,7 +670,7 @@ std::string NormalizeString(const std::string path, int dots = 0; char code; const auto pathLen = path.length(); - for (uint i = 0; i <= pathLen; ++i) { + for (uint8_t i = 0; i <= pathLen; ++i) { if (i < pathLen) { code = path[i]; } else if (IsPathSeparator(path[i])) { diff --git a/src/util.h b/src/util.h index 16288f3d1b011c..8b157ee1f50780 100644 --- a/src/util.h +++ b/src/util.h @@ -971,6 +971,14 @@ class RAIIIsolate { v8::Isolate* isolate_; }; +class Environment; + +#ifdef _WIN32 +bool IsWindowsDeviceRoot(const char c); +#endif + +bool IsPathSeparator(const char c); + std::string NormalizeString(const std::string path, bool allowAboveRoot, const std::string separator);