mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 08:18:51 -05:00
pactest : safety check with MODE
check that the file exists first, otherwise pactest just breaks. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
8ebc07744a
commit
a3ecbec6b5
@ -116,6 +116,9 @@ class pmrule:
|
||||
if not f.ismodified():
|
||||
success = 0
|
||||
elif case == "MODE":
|
||||
if not os.path.isfile(filename):
|
||||
success = 0
|
||||
else:
|
||||
mode = os.lstat(filename)[ST_MODE]
|
||||
if int(value,8) != S_IMODE(mode):
|
||||
success = 0
|
||||
|
Loading…
Reference in New Issue
Block a user