Skip to content

Commit 4b800b2

Browse files
authored
Drop boost::filesystem in favor of std::filesystem (#3990)
1 parent 1cef0ea commit 4b800b2

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ else ()
6161
find_package(Lua REQUIRED)
6262
endif ()
6363

64-
find_package(Boost 1.66.0 REQUIRED COMPONENTS date_time system filesystem iostreams)
64+
find_package(Boost 1.66.0 REQUIRED COMPONENTS date_time system iostreams)
6565

6666
include_directories(${Boost_INCLUDE_DIRS} ${Crypto++_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${PUGIXML_INCLUDE_DIR})
6767
target_link_libraries(tfs PRIVATE
6868
Boost::date_time
6969
Boost::system
70-
Boost::filesystem
7170
Boost::iostreams
7271
fmt::fmt
7372
${CMAKE_THREAD_LIBS_INIT}

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ FROM alpine:3.15.0
2626
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
2727
boost-iostreams \
2828
boost-system \
29-
boost-filesystem \
3029
crypto++ \
3130
fmt \
3231
gmp \

src/script.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
#include "otpch.h"
55

6-
#include "script.h"
7-
#include <boost/filesystem.hpp>
86
#include "configmanager.h"
7+
#include "script.h"
8+
9+
#include <filesystem>
910

1011
extern LuaEnvironment g_luaEnvironment;
1112
extern ConfigManager g_config;
@@ -23,7 +24,7 @@ Scripts::~Scripts()
2324

2425
bool Scripts::loadScripts(std::string folderName, bool isLib, bool reload)
2526
{
26-
namespace fs = boost::filesystem;
27+
namespace fs = std::filesystem;
2728

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

0 commit comments

Comments
 (0)