mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 03:26:01 +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);
|
int fddir = dirfd(dir);
|
||||||
struct dirent* entry;
|
struct dirent* entry;
|
||||||
while ((entry = readdir(dir)) != NULL) {
|
while ((entry = readdir(dir)) != NULL) {
|
||||||
|
if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
if (fstatat(fddir, entry->d_name, &statbuf, 0) != 0) {
|
if (fstatat(fddir, entry->d_name, &statbuf, 0) != 0) {
|
||||||
girara_error("failed to fstatat %s/%s; errno is %d.", plugindir, entry->d_name, errno);
|
girara_error("failed to fstatat %s/%s; errno is %d.", plugindir, entry->d_name, errno);
|
||||||
|
|
Loading…
Reference in a new issue