Skip to content

Commit

Permalink
TemporaryDirectory: Use boost::filesystem::equivalent() instead of ==…
Browse files Browse the repository at this point in the history
… in path comparisons
  • Loading branch information
cameel committed May 19, 2021
1 parent 828b15b commit 4a2080b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/TemporaryDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ TemporaryDirectory::~TemporaryDirectory()
{
// A few paranoid sanity checks just to be extra sure we're not deleting someone's homework.
assert(m_path.string().find(fs::temp_directory_path().string()) == 0);
assert(m_path != fs::temp_directory_path());
assert(m_path != m_path.root_path());
assert(!fs::equivalent(m_path, fs::temp_directory_path()));
assert(!fs::equivalent(m_path, m_path.root_path()));
assert(!m_path.empty());

boost::system::error_code errorCode;
Expand Down

0 comments on commit 4a2080b

Please sign in to comment.