Skip to content

Commit

Permalink
Drop boost::filesystem in favor of std::filesystem (#3990)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt authored Mar 7, 2022
1 parent 1cef0ea commit 4b800b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ else ()
find_package(Lua REQUIRED)
endif ()

find_package(Boost 1.66.0 REQUIRED COMPONENTS date_time system filesystem iostreams)
find_package(Boost 1.66.0 REQUIRED COMPONENTS date_time system iostreams)

include_directories(${Boost_INCLUDE_DIRS} ${Crypto++_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${PUGIXML_INCLUDE_DIR})
target_link_libraries(tfs PRIVATE
Boost::date_time
Boost::system
Boost::filesystem
Boost::iostreams
fmt::fmt
${CMAKE_THREAD_LIBS_INIT}
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ FROM alpine:3.15.0
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
boost-iostreams \
boost-system \
boost-filesystem \
crypto++ \
fmt \
gmp \
Expand Down
7 changes: 4 additions & 3 deletions src/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

#include "otpch.h"

#include "script.h"
#include <boost/filesystem.hpp>
#include "configmanager.h"
#include "script.h"

#include <filesystem>

extern LuaEnvironment g_luaEnvironment;
extern ConfigManager g_config;
Expand All @@ -23,7 +24,7 @@ Scripts::~Scripts()

bool Scripts::loadScripts(std::string folderName, bool isLib, bool reload)
{
namespace fs = boost::filesystem;
namespace fs = std::filesystem;

const auto dir = fs::current_path() / "data" / folderName;
if (!fs::exists(dir) || !fs::is_directory(dir)) {
Expand Down

0 comments on commit 4b800b2

Please sign in to comment.