1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| char envoi[100] ;
char chem[100] ;
getcwd(chem,100) ;
//strcat(envoi, ".part") ;
//strcat(envoi, buf) ;
sprintf(envoi, "%s%s", envoi, chem) ;
sprintf(envoi, "%s%s", envoi, "/") ;
sprintf(envoi, "%s%s", envoi, nomFichier) ;
sprintf(envoi, "%s%s", envoi, ".part") ;
sprintf(envoi, "%s%s", envoi, buf) ;
printf("%s\n", envoi) ;
//getcwd(envoi, 100) ;
//sprintf(envoi, "%s%s", envoi, "/") ;
//sprintf(envoi, "%s%s", nomFichier, ".part") ;
//sprintf(envoi, "%s%s", envoi, buf) ;
//printf("%s\n", envoi) ;
if ((fichier = open("/home/hihi.part0", O_RDONLY))==-1)
{
perror("erreur open hihi") ;
exit(-2) ;
}
if ((fichier = open(envoi, O_RDONLY))==-1)
{
perror("erreur open") ;
exit(-2) ;
} |
Partager