diff options
author | portix <portix@gmx.net> | 2014-03-03 15:38:02 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2014-03-03 15:38:02 +0100 |
commit | a5b91346520adb5d9c8c193c4a02718eebcc0011 (patch) | |
tree | 1238e915a5ed015ab3c33cc371e2a52665178594 | |
parent | e2ad4314566da1dd204b072061ade2c25914eb44 (diff) | |
download | dwb-a5b91346520adb5d9c8c193c4a02718eebcc0011.zip |
Ignore hidden files in archives
-rw-r--r-- | exar/exar.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/exar/exar.c b/exar/exar.c index f2d9231a..d06ffdd7 100644 --- a/exar/exar.c +++ b/exar/exar.c @@ -462,12 +462,25 @@ ftw_pack(const char *fpath, const struct stat *st, int tf) FILE *f = NULL; char flag; const char *stripped = &fpath[s_offset]; + const char *filename; if (!strcmp(stripped, s_out_path)) { LOG(3, "Skipping output file %s\n", s_out_path); return 0; } + + filename = strrchr(stripped, '/'); + + if (filename == NULL) + filename = stripped; + else + filename+=1; + + if (*filename == '.') { + LOG(1, "Ignoring hidden file %s\n", stripped); + return 0; + } LOG(1, "Packing %s (archive path: %s)\n", fpath, stripped); if (S_ISDIR(st->st_mode)) { |