Skip to content
Snippets Groups Projects
Commit 08b01894 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent afb00cc4
No related branches found
No related tags found
No related merge requests found
...@@ -229,16 +229,17 @@ int SystemCall(const std::string &command, bool blocking) ...@@ -229,16 +229,17 @@ int SystemCall(const std::string &command, bool blocking)
#endif #endif
} }
#ifndef MAXPATHLEN std::string getCurrentWorkdir()
#define MAXPATHLEN 1024 {
char path[1024];
#if defined(WIN32)
if(!_getcwd(path, sizeof(path))) return "";
#else
if(!getcwd(path, sizeof(path))) return "";
#endif #endif
std::string str(path);
std::string getCurrentWorkdir(){ // match the convention of SplitFileName that delivers directory path endig
char path[MAXPATHLEN]; // with a directory separator
if(!getcwd(path, MAXPATHLEN)) return "";
std::string str = path;
//match the convention of SplitFileName that delivers directory path
//endig with a directory separator
#if defined(WIN32) #if defined(WIN32)
str.append("\\"); str.append("\\");
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment