mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 18:06:00 +01:00
Skip '.' and '..'
This commit is contained in:
parent
e3b80cb37f
commit
133b127319
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ zathura_document_plugins_load(zathura_t* zathura)
|
|||
int fddir = dirfd(dir);
|
||||
struct dirent* entry;
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
struct stat statbuf;
|
||||
if (fstatat(fddir, entry->d_name, &statbuf, 0) != 0) {
|
||||
girara_error("failed to fstatat %s/%s; errno is %d.", plugindir, entry->d_name, errno);
|
||||
|
|
Loading…
Reference in a new issue