csync_exclude: Ignore files where the filename length is > 254 chars.

This is for example HFS+ and others. It fixes #2882
This commit is contained in:
Klaas Freitag 2015-02-26 17:09:49 +01:00
parent 8507aba9f8
commit 4f7c062f3f

View file

@ -224,7 +224,8 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
}
rc = csync_fnmatch(".csync_journal.db*", bname, 0);
if (rc == 0) {
// check the strlen and ignore the file silently if its name is longer than 254 chars.
if (strlen(bname) > 254 || rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);