mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 09:06:19 +00:00
Changed: Replace Win32 calls by NeL methods
--HG-- branch : develop
This commit is contained in:
parent
3d36a4bfb5
commit
86c82181ca
1 changed files with 7 additions and 14 deletions
|
@ -276,16 +276,7 @@ void CParticleWorkspace::CNode::savePSAs(const std::string &fullPath) throw(NLMI
|
||||||
std::string CParticleWorkspace::CNode::getFullPath() const
|
std::string CParticleWorkspace::CNode::getFullPath() const
|
||||||
{
|
{
|
||||||
nlassert(_WS);
|
nlassert(_WS);
|
||||||
char fullPath[MAX_PATH];
|
return NLMISC::CPath::makePathAbsolute(_RelativePath, _WS->getPath(), true);
|
||||||
std::string basePath = NLMISC::CPath::standardizeDosPath(_WS->getPath());
|
|
||||||
if (PathCombine(fullPath, basePath.c_str(), _RelativePath.c_str()))
|
|
||||||
{
|
|
||||||
return fullPath;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return _RelativePath.c_str();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
//***********************************************************************************************
|
||||||
|
@ -375,16 +366,18 @@ CParticleWorkspace::CNode *CParticleWorkspace::addNode(const std::string &filena
|
||||||
{
|
{
|
||||||
if (NLMISC::nlstricmp(_Nodes[k]->getFilename(), fileName) == 0) return NULL;
|
if (NLMISC::nlstricmp(_Nodes[k]->getFilename(), fileName) == 0) return NULL;
|
||||||
}
|
}
|
||||||
char resultPath[MAX_PATH];
|
|
||||||
|
// TODO: replace with NeL methods
|
||||||
|
TCHAR resultPath[MAX_PATH];
|
||||||
std::string dosPath = NLMISC::CPath::standardizeDosPath(getPath());
|
std::string dosPath = NLMISC::CPath::standardizeDosPath(getPath());
|
||||||
std::string relativePath;
|
std::string relativePath;
|
||||||
if (!PathRelativePathTo(resultPath, dosPath.c_str(), FILE_ATTRIBUTE_DIRECTORY, filenameWithFullPath.c_str(), 0))
|
if (!PathRelativePathTo(resultPath, utf8ToTStr(dosPath), FILE_ATTRIBUTE_DIRECTORY, utf8ToTStr(filenameWithFullPath), 0))
|
||||||
{
|
{
|
||||||
relativePath = filenameWithFullPath;
|
relativePath = filenameWithFullPath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
relativePath = resultPath;
|
relativePath = tStrToUtf8(resultPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relativePath.size() >= 2)
|
if (relativePath.size() >= 2)
|
||||||
|
|
Loading…
Reference in a new issue