From 1c91a9bfe65fb70fd230b00284e772aa74b44492 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 11 Jul 2023 16:49:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9sd=E5=8D=A1=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/application/source/sf_app/code/source/4gMng/sf_sms.c | 6 +++++- .../source/sf_app/code/source/storeMng/sf_storeMng.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/application/source/sf_app/code/source/4gMng/sf_sms.c b/code/application/source/sf_app/code/source/4gMng/sf_sms.c index 095a57e0b..f9d5496a7 100644 --- a/code/application/source/sf_app/code/source/4gMng/sf_sms.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_sms.c @@ -2520,6 +2520,8 @@ SINT32 sf_power_off_check_format_sd(void) SINT32 sf_power_off_check_sd(void) { UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); + SF_STORE_ATTR_S storeattrs = {0}; + /******************** SD cycle *************************/ if((sf_in_card_exist() && (sf_is_card())) || (sf_get_mode_flag() == 1)) { @@ -2528,7 +2530,9 @@ SINT32 sf_power_off_check_sd(void) if((puiPara->SdLoopSwitch) && (!sf_get_mode_flag())) { - sf_sd_loopremove(SF_DCIM_DIR); + sf_sd_info_get(&storeattrs); + if((storeattrs.SDStatus == 0) & (storeattrs.SDFree < SDLOOP_REMAIN_SPACE)) + sf_sd_loopremove(SF_DCIM_DIR); } if(sf_in_card_exist()) diff --git a/code/application/source/sf_app/code/source/storeMng/sf_storeMng.c b/code/application/source/sf_app/code/source/storeMng/sf_storeMng.c index 28b36dfd8..f50c0481a 100644 --- a/code/application/source/sf_app/code/source/storeMng/sf_storeMng.c +++ b/code/application/source/sf_app/code/source/storeMng/sf_storeMng.c @@ -279,12 +279,12 @@ SINT32 sf_sd_loopremove(const char *path) if(strstr(filetype, SF_DCF_EXT_MOV)) { - sprintf(fname, "%sW%s%s.JPG",SF_SEND_LIST_DIR, filedir, filenum); + /*sprintf(fname, "%sW%s%s.JPG",SF_SEND_LIST_DIR, filedir, filenum); if(SF_SUCCESS == sd_file_Isexsit(fname)) { sf_file_remove(fname); MLOGD("Will Delete video sub File Name:%s\n", fname); - } + }*/ sprintf(fname, "%sS%s%s.JPG", SF_SEND_LIST_DIR,filedir, filenum); if(SF_SUCCESS == sd_file_Isexsit(fname)) {