Switch to std::filesystem
Change-Id: I3b8e8adfae9b063f97396d35a5f2296df56a3eb9
diff --git a/tests/daemon/face/unix-stream-transport-fixture.hpp b/tests/daemon/face/unix-stream-transport-fixture.hpp
index 8aca3da..ca4077e 100644
--- a/tests/daemon/face/unix-stream-transport-fixture.hpp
+++ b/tests/daemon/face/unix-stream-transport-fixture.hpp
@@ -34,7 +34,7 @@
#include "tests/daemon/face/dummy-link-service.hpp"
#include "tests/daemon/face/transport-test-common.hpp"
-#include <boost/filesystem/operations.hpp>
+#include <filesystem>
namespace nfd::tests {
@@ -65,14 +65,15 @@
~AcceptorWithCleanup()
{
- boost::system::error_code ec;
- std::string path = local_endpoint(ec).path();
- if (ec) {
- return;
+ try {
+ std::string path = local_endpoint().path();
+ boost::system::error_code ec;
+ close(ec);
+ std::filesystem::remove(path);
}
-
- close(ec);
- boost::filesystem::remove(path, ec);
+ catch (...) {
+ // ignore
+ }
}
};