Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Loic
pkg
Commits
3d7f1e91
Commit
3d7f1e91
authored
Apr 26, 2021
by
Baptiste Daroussin
Browse files
triggers: only consider .ucl files
parent
0cb9b984
Changes
1
Hide whitespace changes
Inline
Side-by-side
libpkg/triggers.c
View file @
3d7f1e91
...
...
@@ -287,9 +287,16 @@ triggers_load(bool cleanup_only)
schema
=
trigger_open_schema
();
while
((
e
=
readdir
(
d
))
!=
NULL
)
{
const
char
*
ext
;
/* ignore all hidden files */
if
(
e
->
d_name
[
0
]
==
'.'
)
continue
;
/* only consider files ending with .ucl */
ext
=
strrchr
(
e
->
d_name
,
'.'
);
if
(
ext
==
NULL
)
continue
;
if
(
strcmp
(
ext
,
".ucl"
)
!=
0
)
continue
;
/* only regular files are considered */
if
(
fstatat
(
dfd
,
e
->
d_name
,
&
st
,
AT_SYMLINK_NOFOLLOW
)
!=
0
)
{
pkg_emit_errno
(
"fstatat"
,
e
->
d_name
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment