diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-10 14:03:13 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-10 14:03:13 +0200 |
| commit | 4a975ab371e8c46f5f16eda9251a81edad1334d6 (patch) | |
| tree | 45ccb6507c71be4696a38e78fea76eb21132b1f8 /Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | |
| parent | 12a5db26faffad018d831b99b77b1bbabe1ae5a9 (diff) | |
| parent | 0002ff43e056d65c82c7a10c77a5402d521f07a9 (diff) | |
| download | Tango-4a975ab371e8c46f5f16eda9251a81edad1334d6.tar.gz Tango-4a975ab371e8c46f5f16eda9251a81edad1334d6.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index d39c335ef..60873243c 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -48,7 +48,7 @@ FIL *UploadFileHandle = 0; //the system supports a single active file FIL *DownloadFileHandle = 0; //the system supports a single active file char FileHandleChar[5]; char ErrorMsg[100]; -#define MAX_CHUNK_LENGTH 2000 +#define MAX_CHUNK_LENGTH 4000 int32_t FileLength = 0; int32_t FileReceivedLength = 0; int32_t FileSentLength = 0; @@ -422,51 +422,10 @@ uint32_t DeleteRequestFunc(MessageContainer* requestContainer) DeleteResponse response = DELETE_RESPONSE__INIT; - DIR dir; FILINFO* fno = 0; //int NumOfFiles = 0; FRESULT Fresult = FR_OK; - /*Fresult |= f_opendir(&dir, g_cCwdBuf); - if(Fresult != FR_OK) - { - LOG_ERROR (Fresult,"f_write error"); - } - else - { - - fno = my_malloc(sizeof(FILINFO)); - memset (fno,0,sizeof(FILINFO)); - Fresult = f_stat(request->path,fno); - if (Fresult == FR_OK) - { - if (isDirectory(fno->fattrib)) - { - //============================ - Fresult = f_opendir(&dir, request->path); - if (Fresult == FR_OK) - { - Fresult = f_readdir(&dir, &fno); - if (Fresult == FR_OK) - { - if(fno->fname[0] ==0) - { - //no files - Fresult = f_unlink(request->path); - } - else - { - LOG_ERROR (fno,"Directory not empty"); - } - } - } - } - else - { - Fresult = f_unlink(request->path); - } - } - }*/ Fresult = f_unlink(request->path); responseContainer = createContainer(MESSAGE_TYPE__DeleteResponse, requestContainer->token, false, &response, &delete_response__pack, &delete_response__get_packed_size); @@ -593,10 +552,6 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) Data[i].length = fno[i]->fsize; Data[i].lastmodifieddate = fno[i]->fdate; Data[i].lastmodifiedtime = fno[i]->ftime; - //strcpy(FullPath[i],request->path); - //strcat(FullPath[i],'\\'); - //strcat(FullPath[i],&fno[i]->fname); - //sprintf (FullPath[i], "%s/%s", request->path, &fno[i]->fname); if (i==0) usnprintf(&FullPath[i], 50, "%s", request->path); else |
