diff options
| author | Nakidai <nakidai@disroot.org> | 2025-06-12 06:01:10 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2025-06-12 06:01:10 +0300 |
| commit | 881874cd9dfb57a5e4d2c7ac56e5878f7da6dc92 (patch) | |
| tree | 9d25afc0d4cbfdfda8610db156339d64dd13cfea | |
| parent | 0c89ae372ef539839d33ff898d8c108c8e0a7ab9 (diff) | |
| download | fp-881874cd9dfb57a5e4d2c7ac56e5878f7da6dc92.tar.gz fp-881874cd9dfb57a5e4d2c7ac56e5878f7da6dc92.zip | |
Add handling for unaccessable directories v1.1.0
| -rw-r--r-- | fp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fp.c b/fp.c index 7a05801..fa54bc3 100644 --- a/fp.c +++ b/fp.c @@ -100,6 +100,8 @@ void loadpath(const char *path) { errno = 0; DIR *dir = opendir(path); + if (!dir) + err(1, "opendir(`%s')", path); for (struct dirent *d; (d = readdir(dir));) { results = realloc(results, sizeof(*results) * ++amount); |