diff options
author | Malfurious <m@lfurio.us> | 2024-10-24 13:56:20 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-10-25 04:41:01 -0400 |
commit | 64f81bd1f8222b6eea14a9b4a897476452484831 (patch) | |
tree | 74b499b7a22b72ee7804e389fe89ceaf5c4ee43c /Options.cpp | |
parent | a86c2daf3d9958c838c55950a53b4a1d6d99f3d1 (diff) | |
download | compass-64f81bd1f8222b6eea14a9b4a897476452484831.tar.gz compass-64f81bd1f8222b6eea14a9b4a897476452484831.zip |
Call Windows-specific API to obtain current working directory
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'Options.cpp')
-rw-r--r-- | Options.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 = "";
|