diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-20 11:07:06 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-12-20 11:07:06 -0500 |
commit | 5c069ee466820daf2ccf90426dbcda2dda1f2012 (patch) | |
tree | 66f65c467a3756e865de81e1a078a6edb395190a | |
parent | 1ebbd909119e41fe62ad680bad6199e0971e3402 (diff) |
util: rename ignore_file() to hidden_file()
hidden_file() is a bit more precise, since dot files usually shouldn't
be ignored, but certainly be considered hidden.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | src/shared/util.c | 8 | ||||
-rw-r--r-- | src/shared/util.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 6790844536..e58e51561b 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -697,7 +697,7 @@ char *xescape(const char *s, const char *bad) { return r; } -_pure_ static bool ignore_file_allow_backup(const char *filename) { +_pure_ static bool hidden_file_allow_backup(const char *filename) { assert(filename); return @@ -714,13 +714,13 @@ _pure_ static bool ignore_file_allow_backup(const char *filename) { endswith(filename, ".swp"); } -bool ignore_file(const char *filename) { +bool hidden_file(const char *filename) { assert(filename); if (endswith(filename, "~")) return true; - return ignore_file_allow_backup(filename); + return hidden_file_allow_backup(filename); } int open_terminal(const char *name, int mode) { @@ -1012,7 +1012,7 @@ bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) { de->d_type != DT_UNKNOWN) return false; - if (ignore_file_allow_backup(de->d_name)) + if (hidden_file_allow_backup(de->d_name)) return false; return endswith(de->d_name, suffix); diff --git a/src/shared/util.h b/src/shared/util.h index 1ce09c7e00..8cdb79cd8f 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -193,7 +193,7 @@ char *xescape(const char *s, const char *bad); bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pure_; -bool ignore_file(const char *filename) _pure_; +bool hidden_file(const char *filename) _pure_; int dev_urandom(void *p, size_t n); void random_bytes(void *p, size_t n); |