소스 검색

fix clips path and check for symlinks

Blake Blackshear 4 년 전
부모
커밋
dd86e4f317
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      detect_objects.py

+ 3 - 3
detect_objects.py

@@ -36,11 +36,11 @@ elif CONFIG_FILE.endswith(".json"):
         CONFIG = json.load(f)
 
 CACHE_DIR = CONFIG.get('save_clips', {}).get('cache_dir', '/cache')
-CLIPS_DIR = CONFIG.get('save_clips', {}).get('clips_dir', '/cache')
+CLIPS_DIR = CONFIG.get('save_clips', {}).get('clips_dir', '/clips')
 
-if not os.path.exists(CACHE_DIR):
+if not os.path.exists(CACHE_DIR) and not os.path.islink(CACHE_DIR):
     os.makedirs(CACHE_DIR)
-if not os.path.exists(CLIPS_DIR):
+if not os.path.exists(CLIPS_DIR) and not os.path.islink(CLIPS_DIR):
     os.makedirs(CLIPS_DIR)
 
 MQTT_HOST = CONFIG['mqtt']['host']