From 8430c8d798d4b722ad8da940c94c7696fd308606 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Thu, 17 May 2018 21:56:49 +0800 Subject: [PATCH] remove boost filesystem --- paddle/fluid/operators/checkpoint_load_op.cc | 10 ++++------ paddle/fluid/operators/checkpoint_save_op.cc | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/paddle/fluid/operators/checkpoint_load_op.cc b/paddle/fluid/operators/checkpoint_load_op.cc index ad237a889..d270ae31e 100644 --- a/paddle/fluid/operators/checkpoint_load_op.cc +++ b/paddle/fluid/operators/checkpoint_load_op.cc @@ -18,9 +18,6 @@ limitations under the License. */ #include #include #include - -#include - #include "paddle/fluid/framework/data_type.h" #include "paddle/fluid/framework/data_type_transform.h" #include "paddle/fluid/framework/framework.pb.h" @@ -42,9 +39,10 @@ static bool FileExists(const std::string &filepath) { } static std::string GenePath(const std::string &dir, const std::string &file) { - boost::filesystem::path dir(dir); - boost::filesystem::path file(file); - boost::filesystem::path full_path = dir / file; + std::string file_path; + file_path.append(file_path); + file_path.append("/"); + file_path.append(file); return full_path; } diff --git a/paddle/fluid/operators/checkpoint_save_op.cc b/paddle/fluid/operators/checkpoint_save_op.cc index 54911fc05..ee494c688 100644 --- a/paddle/fluid/operators/checkpoint_save_op.cc +++ b/paddle/fluid/operators/checkpoint_save_op.cc @@ -18,9 +18,6 @@ limitations under the License. */ #include #include #include - -#include - #include "paddle/fluid/framework/data_type.h" #include "paddle/fluid/framework/data_type_transform.h" #include "paddle/fluid/framework/framework.pb.h" @@ -37,9 +34,10 @@ const char SUCCESS[] = "_SUCCESS"; const char SERIAL_VAR[] = "SERIAL_NUMBER"; static std::string GenePath(const std::string &dir, const std::string &file) { - boost::filesystem::path dir(dir); - boost::filesystem::path file(file); - boost::filesystem::path full_path = dir / file; + std::string file_path; + file_path.append(file_path); + file_path.append("/"); + file_path.append(file); return full_path; } -- GitLab