summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-10-24 13:56:20 -0400
committerMalfurious <m@lfurio.us>2024-10-25 04:41:01 -0400
commit64f81bd1f8222b6eea14a9b4a897476452484831 (patch)
tree74b499b7a22b72ee7804e389fe89ceaf5c4ee43c
parenta86c2daf3d9958c838c55950a53b4a1d6d99f3d1 (diff)
downloadcompass-64f81bd1f8222b6eea14a9b4a897476452484831.tar.gz
compass-64f81bd1f8222b6eea14a9b4a897476452484831.zip
Call Windows-specific API to obtain current working directory
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--Options.cpp4
-rw-r--r--Options.h1
2 files changed, 4 insertions, 1 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 = "";
diff --git a/Options.h b/Options.h
index 9440964..90be725 100644
--- a/Options.h
+++ b/Options.h
@@ -6,7 +6,6 @@
#include <sstream>
#include <fstream>
#include <vector>
-#include <unistd.h>
#include "Cryptor.h"