From 2bd600bd512976cf0b9befc827bfa76df4254e9b Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Sun, 11 Dec 2022 15:06:09 -0500 Subject: [PATCH] v1.5.t5 Fixed a bug that caused the buffDir to get deleted before the app did any work. Apparently the filesystem lib crashes the app if the directory doesn't exists. Might need to add protection against that in the future. Directory pages with now explicitly link to index.html since implicit does not work for apache2. --- src/common.cpp | 6 +++--- src/common.h | 2 +- src/web.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index a556974..9b38760 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -225,15 +225,15 @@ bool rdConf(shared_t *share) share->outDir = cleanDir(share->webRoot) + "/" + share->camName; - createDirTree(cleanDir(share->buffDir)); - createDirTree(share->outDir); - if (share->init) { remove_all(share->buffDir.c_str()); share->init = false; } + + createDirTree(cleanDir(share->buffDir)); + createDirTree(share->outDir); } varFile.close(); diff --git a/src/common.h b/src/common.h index 2fc40de..769a228 100644 --- a/src/common.h +++ b/src/common.h @@ -35,7 +35,7 @@ using namespace cv; using namespace std; using namespace std::filesystem; -#define APP_VER "1.5.t4" +#define APP_VER "1.5.t5" #define APP_NAME "Motion Watch" struct shared_t diff --git a/src/web.cpp b/src/web.cpp index ec83075..11fb48c 100644 --- a/src/web.cpp +++ b/src/web.cpp @@ -33,7 +33,7 @@ void genHTMLul(const string &outputDir, const string &title, shared_t *share) for (auto &&dirName : dirNames) { - htmlText += "
  • " + dirName + "
  • \n"; + htmlText += "
  • " + dirName + "
  • \n"; } htmlText += "\n";