aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-02-10 11:20:37 +0200
committerAvi Levkovich <avi@twine-s.com>2019-02-10 11:20:37 +0200
commitd3c43e82a5302c500d9debb30b345039e225e493 (patch)
tree8e5143f7908ca923acc3020093a3b38ffce02bf9 /Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
parent78951cd7cf7f7d346d4f3dbaa1ed2ffdce72dbb1 (diff)
parent3a970a55197e14c53e2692bf64d6caa62f51ed4b (diff)
downloadTango-d3c43e82a5302c500d9debb30b345039e225e493.tar.gz
Tango-d3c43e82a5302c500d9debb30b345039e225e493.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.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