update ftpclient
This commit is contained in:
parent
7c5d473af2
commit
4295885cee
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue