mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
basic/unit-file: ignore any hidden files immediately
Hidden and backup files cannot be valid unit name (we reject anything starting with a dot, and we require type suffixes). So let's not iterate over those at all.
This commit is contained in:
parent
e6f1d7f4ec
commit
3796bdc55d
@ -284,7 +284,7 @@ int unit_file_build_name_map(
|
||||
continue;
|
||||
}
|
||||
|
||||
FOREACH_DIRENT_ALL(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
|
||||
FOREACH_DIRENT(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
|
||||
char *filename;
|
||||
_cleanup_free_ char *_filename_free = NULL, *simplified = NULL;
|
||||
const char *suffix, *dst = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user