switch back to boost::filesystem to avoid the requirement of c++17

This commit is contained in:
Chunting Gu
2020-09-07 19:01:31 +08:00
parent e7f88da2b2
commit 84476f75f7
31 changed files with 175 additions and 192 deletions
+6 -4
View File
@@ -1,10 +1,13 @@
#include <filesystem>
#include <iostream>
#include "boost/filesystem/operations.hpp"
#include "webcc/logger.h"
#include "book_client.h"
namespace bfs = boost::filesystem;
// -----------------------------------------------------------------------------
void PrintSeparator() {
@@ -36,9 +39,8 @@ int main(int argc, char* argv[]) {
std::string url = argv[1];
std::filesystem::path photo_dir = argv[2];
if (!std::filesystem::is_directory(photo_dir) ||
!std::filesystem::exists(photo_dir)) {
bfs::path photo_dir = argv[2];
if (!bfs::is_directory(photo_dir) || !bfs::exists(photo_dir)) {
std::cerr << "Invalid photo dir!" << std::endl;
return 1;
}