src/scanner.c

changeset 58
bb512754aaf3
parent 57
68018eac46c3
child 60
69be673a4fd0
equal deleted inserted replaced
57:68018eac46c3 58:bb512754aaf3
47 DIR *dirf; 47 DIR *dirf;
48 struct dirent *entry; 48 struct dirent *entry;
49 struct stat statbuf; 49 struct stat statbuf;
50 50
51 if ((dirf = opendir(scanner.dir)) == NULL) { 51 if ((dirf = opendir(scanner.dir)) == NULL) {
52 printf("%s", scanner.dir); 52 fprintf(stderr, "%s - ", scanner.dir);
53 perror(" Directory access failed"); 53 perror("Directory access failed");
54 return 0; 54 return 0;
55 } 55 }
56 56
57 while ((entry = readdir(dirf)) != NULL) { 57 while ((entry = readdir(dirf)) != NULL) {
58 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) { 58 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {

mercurial