1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Remove boost::filesystem from essimporter

This commit is contained in:
jvoisin 2022-05-23 21:36:53 +02:00
parent 7950ea1f54
commit 8a63bc0def
2 changed files with 2 additions and 4 deletions

View File

@ -36,7 +36,6 @@ openmw_add_executable(openmw-essimporter
target_link_libraries(openmw-essimporter
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
components
)

View File

@ -1,14 +1,13 @@
#include <iostream>
#include <filesystem>
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include <components/files/configurationmanager.hpp>
#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?");