update ftpclient
This commit is contained in:
parent
7c5d473af2
commit
4295885cee
|
@ -216,17 +216,9 @@ int Download(char *name)
|
||||||
}
|
}
|
||||||
closesocket(data_fd);
|
closesocket(data_fd);
|
||||||
printf("creating file %s ....\r\n",name);
|
printf("creating file %s ....\r\n",name);
|
||||||
int file=open(name,O_RDWR | O_CREAT);
|
FILE * file = fopen(name,"w");
|
||||||
if(file > 0){
|
fprintf(file,buf);
|
||||||
ret = PrivWrite(file,buf,strlen(buf));
|
fclose(file);
|
||||||
if(ret < 0 ){
|
|
||||||
printf("write failed\r\n");
|
|
||||||
}
|
|
||||||
else printf("success!\r\n");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printf("create file %s failed\r\n",name);
|
|
||||||
}
|
|
||||||
if(buf != NULL){
|
if(buf != NULL){
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue