From 64f81bd1f8222b6eea14a9b4a897476452484831 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 24 Oct 2024 13:56:20 -0400 Subject: Call Windows-specific API to obtain current working directory Signed-off-by: Malfurious --- Options.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Options.cpp') diff --git a/Options.cpp b/Options.cpp index acfb803..c862bb8 100644 --- a/Options.cpp +++ b/Options.cpp @@ -2,7 +2,11 @@ Options::Options() { char _cwd[FILENAME_MAX]; +#ifdef WIN32 + GetCurrentDirectory(FILENAME_MAX, _cwd); +#else getcwd(_cwd, FILENAME_MAX); +#endif std::string cwd(_cwd); user = ""; -- cgit v1.2.3