diff --git a/rpmlint/checks/FilesCheck.py b/rpmlint/checks/FilesCheck.py index 2212b0526..d60f3e350 100644 --- a/rpmlint/checks/FilesCheck.py +++ b/rpmlint/checks/FilesCheck.py @@ -341,7 +341,7 @@ def find_perm_in_tmpfiles(pkg, fname): for k, v in pkg.files.items(): if 'tmpfiles.d' not in k: continue - if not os.path.exists(v.path): + if not os.path.exists(v.path) or os.path.isdir(v.path): continue with open(v.path) as f: tmpd += f.readlines() diff --git a/test/test_files.py b/test/test_files.py index 65a7705b0..804fc3b64 100644 --- a/test/test_files.py +++ b/test/test_files.py @@ -375,6 +375,7 @@ def test_files_without_perms(package, output, test): f /run/netconfig/yp.conf 0644 root root - """ }, + '/etc/tmpfiles.d': {'is_dir': True}, }, ), ])