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) { |