X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/96f3a8a54eeb3b2294ed953dad8b15349f3e2703..d42870d6ca7fb587b38f8cf6d6821ae33a53a696:/components/num_files.c diff --git a/components/num_files.c b/components/num_files.c index c471400..acf9dfa 100644 --- a/components/num_files.c +++ b/components/num_files.c @@ -1,4 +1,5 @@ /* See LICENSE file for copyright and license details. */ +#include #include #include #include @@ -13,7 +14,7 @@ num_files(const char *dir) int num = 0; if ((fd = opendir(dir)) == NULL) { - fprintf(stderr, "Failed to get number of files in directory %s", dir); + fprintf(stderr, "opendir '%s': %s\n", dir, strerror(errno)); return NULL; }