update ftpclient

This commit is contained in:
Ambrumf 2023-10-17 00:54:21 +08:00
parent 7c5d473af2
commit 4295885cee
1 changed files with 3 additions and 11 deletions

View File

@ -216,17 +216,9 @@ int Download(char *name)
}
closesocket(data_fd);
printf("creating file %s ....\r\n",name);
int file=open(name,O_RDWR | O_CREAT);
if(file > 0){
ret = PrivWrite(file,buf,strlen(buf));
if(ret < 0 ){
printf("write failed\r\n");
}
else printf("success!\r\n");
}
else {
printf("create file %s failed\r\n",name);
}
FILE * file = fopen(name,"w");
fprintf(file,buf);
fclose(file);
if(buf != NULL){
free(buf);
}