diff --git a/paddle/fluid/operators/checkpoint_load_op.cc b/paddle/fluid/operators/checkpoint_load_op.cc index ad237a889ad0a2ca8a7b6c2fea9061eb8350ffdf..d270ae31ed79115597756681ce77f2db1994b445 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 54911fc054c213eade970b9604c82c89bba55ebf..ee494c68822c436871264815a8285a32b6a77d32 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; }