aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c47
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