Skip to content

Commit

Permalink
Merge pull request #1258 from rpm-software-management/fix-files-check
Browse files Browse the repository at this point in the history
FilesCheck: Fix zero permission check with folder
  • Loading branch information
danigm authored Aug 2, 2024
2 parents 76f2e4d + 21918dc commit 78f9ad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rpmlint/checks/FilesCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions test/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
),
])
Expand Down

0 comments on commit 78f9ad0

Please sign in to comment.