mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 05:25:50 +03:00
exclude: Simplify the csync_excluded() loop.
Thanks to Klaas Freitag.
This commit is contained in:
parent
e43466d09d
commit
14f03e0ebb
1 changed files with 8 additions and 12 deletions
|
@ -163,19 +163,15 @@ int csync_excluded(CSYNC *ctx, const char *path) {
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (ctx->excludes->count) {
|
||||
for (i = 0; i < ctx->excludes->count; i++) {
|
||||
rc = csync_fnmatch(ctx->excludes->vector[i], path, 0);
|
||||
if (rc == 0) {
|
||||
match = 1;
|
||||
goto out;
|
||||
}
|
||||
for (i = 0; match == 0 && i < ctx->excludes->count; i++) {
|
||||
rc = csync_fnmatch(ctx->excludes->vector[i], path, 0);
|
||||
if (rc == 0) {
|
||||
match = 1;
|
||||
}
|
||||
|
||||
rc = csync_fnmatch(ctx->excludes->vector[i], bname, 0);
|
||||
if (rc == 0) {
|
||||
match = 1;
|
||||
goto out;
|
||||
}
|
||||
rc = csync_fnmatch(ctx->excludes->vector[i], bname, 0);
|
||||
if (rc == 0) {
|
||||
match = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue