summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index cf95fb7..b042f95 100644
--- a/src/config.c
+++ b/src/config.c
@@ -132,7 +132,7 @@ static bool config_match(const char *opt, ...) {
va_list ap;
bool match = false;
const char *str;
-
+
va_start(ap, opt);
while((str = va_arg(ap, const char*)) != NULL) {
@@ -351,6 +351,11 @@ static void read_peer_dir(fastd_context_t *ctx, fastd_config_t *conf, const char
if (result->d_name[0] == '.')
continue;
+ if (result->d_name[strlen(result->d_name)-1] == '~') {
+ pr_verbose(ctx, "ignoring file `%s' as it seems to be a backup file", result->d_name);
+ continue;
+ }
+
struct stat statbuf;
if (stat(result->d_name, &statbuf)) {
pr_warn(ctx, "ignoring file `%s': stat failed: %s", result->d_name, strerror(errno));