Fixed bug ID0002513, where Mesh.export failed.
The failure occered when Mesh.export was passed just a filename, such as 'out.stl'. If '/some/path/out.stl' was passed it succeeded.
This commit is contained in:
committed by
wmayer
parent
dc12e8b72b
commit
5540dd81c2
@@ -92,6 +92,9 @@ std::wstring ConvertToWideString(const std::string& string)
|
||||
wideCharString = NULL;
|
||||
return wideString;
|
||||
}
|
||||
#define GetCurrentDir direct::_getcwd
|
||||
#elif defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
|
||||
#define GetCurrentDir unistd::getcwd
|
||||
#endif
|
||||
|
||||
|
||||
@@ -225,7 +228,16 @@ std::string FileInfo::fileName () const
|
||||
|
||||
std::string FileInfo::dirPath () const
|
||||
{
|
||||
return FileName.substr(0,FileName.find_last_of('/'));
|
||||
std::size_t last_pos;
|
||||
std::string retval;
|
||||
last_pos = FileName.find_last_of('/');
|
||||
if (last_pos != std::string::npos) {
|
||||
retval = FileName.substr(0, last_pos);
|
||||
}
|
||||
else{
|
||||
retval = std::string(GetCurrentDir(NULL, 0));
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
std::string FileInfo::fileNamePure () const
|
||||
|
||||
Reference in New Issue
Block a user