删除冗余代码

master
huangyongan 3 years ago
parent 85c0513d0a
commit 55fa29f359

@ -4,7 +4,7 @@
#include <string>
#define K_VISION_DIR "/hard/k_vision"
#define AI_VISION_DIR "/ssd/ai_vision"
#define AI_VISION_DIR "/hard/ai_vision"
namespace fs = boost::filesystem;
@ -132,15 +132,10 @@ std::string get_file_timestamp_str(const std::string& strPath)
if (strPath.empty())
{
return str;
}
fs::path path(strPath);
if (!fs::exists(path))
{
return str;
}
}
str = path.filename().string();
str = str.substr(0, 15);
return str;
auto strTime = str.substr(0, 15);
return strTime;
}
int main(int argc, char* argv[]) {
@ -205,7 +200,7 @@ int main(int argc, char* argv[]) {
auto strName = path.filename().string();
std::string strPath = std::string(szSaveDir) + strName;
boost::system::error_code err_code;
fs::copy_file(it,strPath,fs::copy_option::overwrite_if_exists, err_code);
fs::copy_file(it, strPath, fs::copy_option::overwrite_if_exists, err_code);
if (err_code.value() == 0)
{
++i;

Loading…
Cancel
Save