Skip to content

Commit

Permalink
fix: use boost::filesystem::path instead of std::filesystem::path
Browse files Browse the repository at this point in the history
  • Loading branch information
empiredan committed Dec 14, 2023
1 parent 2b7d658 commit e2f2ad7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/shell/commands/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/

// IWYU pragma: no_include <bits/getopt_core.h>
// TODO(wangdan): Since std::filesystem was first introduced in
// gcc 8 and clang 10, we could only use boost::filesystem for
// now. Once the minimum version of all the compilers we support
// has reached these versions, use #include <filesystem> instead.
#include <boost/filesystem/path.hpp>
// TODO(yingchun): refactor this after libfmt upgraded
#include <fmt/chrono.h> // IWYU pragma: keep
#include <fmt/printf.h> // IWYU pragma: keep
Expand All @@ -35,7 +40,6 @@
#include <ctime>
// IWYU pragma: no_include <fmt/core.h>
// IWYU pragma: no_include <fmt/format.h>
#include <filesystem>
#include <functional>
#include <iostream>
#include <string>
Expand Down Expand Up @@ -109,7 +113,7 @@ bool mlog_dump(command_executor *e, shell_context *sc, arguments args)
return false;
}

const auto replica_path = std::filesystem::path(plog_dir).parent_path();
const auto replica_path = boost::filesystem::path(plog_dir).parent_path();
const auto name = replica_path.filename().string();
if (name.empty()) {
fmt::print(stderr, "ERROR: '{}' is not a valid plog directory\n", plog_dir);
Expand Down

0 comments on commit e2f2ad7

Please sign in to comment.