1.sd卡循环增加异常目录处理,错误5次退出
This commit is contained in:
parent
087c51cca8
commit
9cdfda03f5
|
@ -767,8 +767,9 @@ int sf_app_sd_loop(void)
|
|||
char cFileTmp[512] = {0};
|
||||
int iFileCount = 0;
|
||||
int nloop = 1;
|
||||
int nDirKey = 0, nFileKey = 0;
|
||||
UINT32 nDirKey = 0, nFileKey = 0;
|
||||
SF_STORE_ATTR_S storeattrs = {0};
|
||||
int dircount = 0;
|
||||
|
||||
sf_dcf_resort_min();
|
||||
nDirKey = gLastDirKey;
|
||||
|
@ -776,7 +777,7 @@ int sf_app_sd_loop(void)
|
|||
|
||||
MLOGD(" s\n");
|
||||
|
||||
while(nloop)
|
||||
while((nloop) && (dircount < 5))
|
||||
{
|
||||
sprintf(cPathTmp,"%s%s/%03d%s", SF_SD_ROOT, SF_DCF_ROOT_DIR_NAME, nDirKey, DCF_DIR_NAME); // ""/mnt/sd/DCIM/100MEDIA"
|
||||
//Not Empty,Record File Name
|
||||
|
@ -802,6 +803,14 @@ int sf_app_sd_loop(void)
|
|||
//sleep(1);
|
||||
system("sync");
|
||||
sf_dcf_resort_min();
|
||||
if(nDirKey == gLastDirKey)
|
||||
{
|
||||
dircount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dircount = 0;
|
||||
}
|
||||
nDirKey = gLastDirKey;
|
||||
nFileKey = gLastFileKey;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue
Block a user