mirror of https://github.com/nealey/eris.git
I hate this directory indexing output less
This commit is contained in:
parent
b4cb8c1e96
commit
6af696b8ec
6
eris.c
6
eris.c
|
@ -410,7 +410,7 @@ serve_idx(int fd, char *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (S_ISDIR(st.st_mode)) {
|
if (S_ISDIR(st.st_mode)) {
|
||||||
printf("[DIR] ");
|
printf("[DIR] ");
|
||||||
} else if (S_ISLNK(st.st_mode)) {
|
} else if (S_ISLNK(st.st_mode)) {
|
||||||
ssize_t len = readlink(de->d_name, symlink, (sizeof symlink) - 1);
|
ssize_t len = readlink(de->d_name, symlink, (sizeof symlink) - 1);
|
||||||
|
|
||||||
|
@ -418,9 +418,9 @@ serve_idx(int fd, char *path)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
name = symlink;
|
name = symlink;
|
||||||
printf("[LNK] "); /* symlink */
|
printf("[LNK] "); /* symlink */
|
||||||
} else if (S_ISREG(st.st_mode)) {
|
} else if (S_ISREG(st.st_mode)) {
|
||||||
printf("[ ] %10llu", (unsigned long long)st.st_size);
|
printf("%10llu", (unsigned long long)st.st_size);
|
||||||
} else {
|
} else {
|
||||||
continue; /* not a file we can provide -> skip */
|
continue; /* not a file we can provide -> skip */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue