From 8a63bc0def7eb5146f26a33c4223413bd4a3b94c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 23 May 2022 21:36:53 +0200 Subject: [PATCH] Remove boost::filesystem from essimporter --- apps/essimporter/CMakeLists.txt | 1 - apps/essimporter/main.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/essimporter/CMakeLists.txt b/apps/essimporter/CMakeLists.txt index 0e742ff548..3dafba09ba 100644 --- a/apps/essimporter/CMakeLists.txt +++ b/apps/essimporter/CMakeLists.txt @@ -36,7 +36,6 @@ openmw_add_executable(openmw-essimporter target_link_libraries(openmw-essimporter ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY} components ) diff --git a/apps/essimporter/main.cpp b/apps/essimporter/main.cpp index bc5d34bc03..9517df2d2a 100644 --- a/apps/essimporter/main.cpp +++ b/apps/essimporter/main.cpp @@ -1,14 +1,13 @@ #include +#include #include -#include #include #include "importer.hpp" namespace bpo = boost::program_options; -namespace bfs = boost::filesystem; int main(int argc, char** argv) @@ -57,7 +56,7 @@ int main(int argc, char** argv) else { const std::string& ext = ".omwsave"; - if (bfs::exists(bfs::path(outputFile)) + if (std::filesystem::exists(std::filesystem::path(outputFile)) && (outputFile.size() < ext.size() || outputFile.substr(outputFile.size()-ext.size()) != ext)) { throw std::runtime_error("Output file already exists and does not end in .omwsave. Did you mean to use --compare?");