Skip to content

Truly independent web browser

LibCore: Define OS-specific PATH separators

Timothy Flynn4c744742db9a
diff --git a/Libraries/LibCore/Environment.h b/Libraries/LibCore/Environment.h
index e4885e26088..5cdca52c49a 100644
--- a/Libraries/LibCore/Environment.h
+++ b/Libraries/LibCore/Environment.h
@@ -8,6 +8,7 @@
#include <AK/Error.h>
#include <AK/Optional.h>
+#include <AK/Platform.h>
#include <AK/StringView.h>
#include <LibCore/Export.h>
@@ -15,6 +16,12 @@ namespace Core::Environment {
CORE_API char** raw_environ();
+#if defined(AK_OS_WINDOWS)
+constexpr inline auto PATH_SEPARATOR = ';';
+#else
+constexpr inline auto PATH_SEPARATOR = ':';
+#endif
+
struct CORE_API Entry {
StringView full_entry;
StringView name;