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 ++++ Options.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) 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 #include #include -#include #include "Cryptor.h" -- cgit v1.2.3