diff --git a/source/filesystem/filesystem.cpp b/source/filesystem/filesystem.cpp index 51d70ff4..80396b00 100644 --- a/source/filesystem/filesystem.cpp +++ b/source/filesystem/filesystem.cpp @@ -430,7 +430,8 @@ namespace nana { delete[] p; return s; } - return buf; + nana::string s = buf; + return s; } #elif defined(NANA_LINUX) const char * s = ::getenv("PWD");