diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:07:01 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:07:01 +0100 |
commit | c85dc17be718014260e10e41d15ba8f7329fed26 (patch) | |
tree | 7a6a41ca48f4bb0a6e073ad1dce0b09acac61f7d /load-dropin.c | |
parent | a6a80b4f440bcc1c6087572503c08a72ee674075 (diff) |
util: unify code to check whether certain file names should be ignored when listing files
Diffstat (limited to 'load-dropin.c')
-rw-r--r-- | load-dropin.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/load-dropin.c b/load-dropin.c index af95d37a03..a3c9d3c77d 100644 --- a/load-dropin.c +++ b/load-dropin.c @@ -60,12 +60,8 @@ int unit_load_dropin(Unit *u) { free(path); while ((de = readdir(d))) { - if (de->d_name[0] == '.') - continue; - - assert(de->d_name[0]); - if (de->d_name[strlen(de->d_name)-1] == '~') + if (ignore_file(de->d_name)) continue; if (asprintf(&path, "%s/%s.wants/%s", *p, t, de->d_name) < 0) { |