Просмотр исходного кода

ignore hidden files in configuration->model selection

Frank Haverland 3 лет назад
Родитель
Сommit
c124c38e70
3 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      .gitignore
  2. 2 0
      README.md
  3. 5 0
      code/components/jomjol_fileserver_ota/server_file.cpp

+ 1 - 0
.gitignore

@@ -15,3 +15,4 @@ install_manifest.txt
 compile_commands.json
 CTestTestfile.cmake
 _deps
+code/edgeAI.code-workspace

+ 2 - 0
README.md

@@ -50,7 +50,9 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 
 ------
 
+##### 10.6.2
 
+- ignore hidden files in model selection (configuration page) 
 
 
 ##### 10.6.1 - Stability Increase (2022-07-24)

+ 5 - 0
code/components/jomjol_fileserver_ota/server_file.cpp

@@ -95,6 +95,11 @@ esp_err_t get_tflite_file_handler(httpd_req_t *req)
         _filename = std::string(entry->d_name);
         printf("File: %s\t", _filename.c_str());
 
+        // ignore all files with starting dot (hidden files)
+        if (_filename.rfind(".", 0) == 0) {
+            continue;
+        }
+
         _fileext = _filename;
         pos = _fileext.find_last_of(".");
         if (pos != std::string::npos)