diff --git a/src/common.h b/src/common.h index 70568bd..b2638a1 100644 --- a/src/common.h +++ b/src/common.h @@ -34,7 +34,7 @@ using namespace std; using namespace std::filesystem; #define BUF_SZ 10 -#define APP_VER "1.3.t2" +#define APP_VER "1.3.t3" struct shared_t { diff --git a/src/main.cpp b/src/main.cpp index 62a9f27..e84f0ba 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,22 +26,24 @@ void detectLoop(shared_t *share) Rect blockArea; Mat blockImg; - if (moDetect(bufFiles[0], &blockArea, &blockImg, share)) + auto fullPath = cleanDir(share->buffDir) + "/" + bufFiles[0]; + + if (moDetect(fullPath, &blockArea, &blockImg, share)) { if (objectInImage(blockImg, blockArea)) { share->skipCmd = true; - wrOut(bufFiles[0], share); + wrOut(fullPath, share); } else { - remove(bufFiles[0].c_str()); + remove(fullPath.c_str()); } } else { - remove(bufFiles[0].c_str()); + remove(fullPath.c_str()); } } else