core: SystemPath::Exists() produces wrong results (compared to std::filesystem::exists())
While working on MR !1154, I realized that the animation-interface
test (src/netanim/test/netanim-test.cc
) was failing in the following check:
void
AbstractAnimationInterfaceTestCase::CheckFileExistence()
{
bool fileExists = SystemPath::Exists(m_traceFileName);
NS_TEST_ASSERT_MSG_EQ(fileExists, true, "Trace file was not created");
// ...
}
However, if I use the equivalent function std::filesystem::exists()
, it correctly detects the file and passes the test.
I'm not sure why the implementation of the SystemPath::Exists()
function is using such complex code and not relying on the equivalent function fs::exists()
.