summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-27 17:04:53 +0100
committerRichard Jones <rjones@redhat.com>2010-08-27 17:11:48 +0100
commit7d7d6e5814475dc4f97f9af8965462c8865e1ae1 (patch)
tree23a531d8182533599f87de3ff7b86cc712440b64 /helper
parent6066c3e245a28b55dd1c02d2dd1b524d83068ef3 (diff)
downloadfebootstrap-7d7d6e5814475dc4f97f9af8965462c8865e1ae1.tar.gz
febootstrap-7d7d6e5814475dc4f97f9af8965462c8865e1ae1.tar.xz
febootstrap-7d7d6e5814475dc4f97f9af8965462c8865e1ae1.zip
helper: Ignore editor backup (*~) files.
Diffstat (limited to 'helper')
-rw-r--r--helper/appliance.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/helper/appliance.c b/helper/appliance.c
index e014b12..85efd75 100644
--- a/helper/appliance.c
+++ b/helper/appliance.c
@@ -144,6 +144,11 @@ iterate_input_directory (const char *dirname, int dirfd, struct writer *writer)
if (d->d_name[0] == '.') /* ignore ., .. and any hidden files. */
continue;
+ /* Ignore *~ files created by editors. */
+ size_t len = strlen (d->d_name);
+ if (len > 0 && d->d_name[len-1] == '~')
+ continue;
+
add_string (&entries, &nr_entries, &nr_alloc, d->d_name);
}