+ strcpy(full_rep, base);
+ strcat(full_rep, "/");
+ strcat(full_rep, path);
+ zebra_file_stat(full_rep, &finfo, follow_links);
+ }
+ else
+ zebra_file_stat(path, &finfo, follow_links);
+ switch (finfo.st_mode & S_IFMT)
+ {
+ case S_IFREG:
+ entry[idx].kind = dirs_file;
+ entry[idx].mtime = finfo.st_mtime;
+ entry[idx].name = (char *) xmalloc(strlen(dent->d_name)+1);
+ strcpy(entry[idx].name, dent->d_name);
+ idx++;
+ break;
+ case S_IFDIR:
+ entry[idx].kind = dirs_dir;
+ entry[idx].mtime = finfo.st_mtime;
+ entry[idx].name = (char *) xmalloc(strlen(dent->d_name)+2);
+ strcpy(entry[idx].name, dent->d_name);
+ strcat(entry[idx].name, "/");
+ idx++;
+ break;