From ec64a787c6ced5e0257b94ae143a54f590be46d1 Mon Sep 17 00:00:00 2001 From: Lethosor Date: Thu, 19 Jun 2014 22:34:40 -0400 Subject: [PATCH] Use _getcwd on Windows --- library/modules/Filesystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/modules/Filesystem.cpp b/library/modules/Filesystem.cpp index 2c3cf5dfe..35a48930f 100644 --- a/library/modules/Filesystem.cpp +++ b/library/modules/Filesystem.cpp @@ -58,7 +58,11 @@ char * DFHack::Filesystem::getcwd () { char *path; char buf[LFS_MAXPATHLEN]; +#ifdef _WIN32 + if ((path = ::_getcwd(buf, LFS_MAXPATHLEN)) == NULL) +#else if ((path = ::getcwd(buf, LFS_MAXPATHLEN)) == NULL) +#endif return NULL; else return path;