diff --git a/main.cpp b/main.cpp index 5c4b71f..43a5bc9 100644 --- a/main.cpp +++ b/main.cpp @@ -4,7 +4,7 @@ #include #define K_VISION_DIR "/hard/k_vision" -#define AI_VISION_DIR "/hard/ai_vision" +#define AI_VISION_DIR "/ssd/ai_vision" namespace fs = boost::filesystem; @@ -204,8 +204,16 @@ int main(int argc, char* argv[]) { fs::path path(it); auto strName = path.filename().string(); std::string strPath = std::string(szSaveDir) + strName; - fs::copy_file(it,strPath,fs::copy_option::overwrite_if_exists); - ++i; + boost::system::error_code err_code; + fs::copy_file(it,strPath,fs::copy_option::overwrite_if_exists, err_code); + if (err_code.value() == 0) + { + ++i; + } + else + { + std::cout << "error: copy file failed - " << it << std::endl; + } if (i % 50 == 0) { std::cout << "info: copy progress " << i << "/" << vec_matched_path.size() << std::endl;