1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Fixed the SysPath type returning wrong result in test emptiness.

Added the option to build the path as a string using a speciffic style.
This commit is contained in:
Sandu Liviu Catalin 2016-03-11 20:52:00 +02:00
parent f27a195b6f
commit 3fa7b17bd7
2 changed files with 3 additions and 1 deletions

View File

@ -1665,6 +1665,8 @@ void Register_SysPath(HSQUIRRELVM vm)
.Func(_SC("Clear"), &SysPath::Clear)
.Func< SysPath & (SysPath::*)(const SysPath &) >(_SC("AssignPath"), &SysPath::Assign)
.Func< SysPath & (SysPath::*)(const SysPath &) >(_SC("AppendPath"), &SysPath::Append)
.Func(_SC("Build"), &SysPath::ToStr)
.Func(_SC("ToStr"), &SysPath::ToStr)
.Func(_SC("MakeDir"), &SysPath::MakeDirectory)
.Func(_SC("MakeDirectory"), &SysPath::MakeDirectory)
.Func(_SC("MakeFile"), &SysPath::MakeFile)

View File

@ -330,7 +330,7 @@ public:
*/
bool Empty() const
{
return (!m_Dirs.empty() || !m_Name.empty() || m_Drive != 0);
return (m_Dirs.empty() && m_Name.empty() && m_Drive == 0);
}
/* --------------------------------------------------------------------------------------------