mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +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;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->excludes->count) {
|
for (i = 0; match == 0 && i < ctx->excludes->count; i++) {
|
||||||
for (i = 0; i < ctx->excludes->count; i++) {
|
rc = csync_fnmatch(ctx->excludes->vector[i], path, 0);
|
||||||
rc = csync_fnmatch(ctx->excludes->vector[i], path, 0);
|
if (rc == 0) {
|
||||||
if (rc == 0) {
|
match = 1;
|
||||||
match = 1;
|
}
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = csync_fnmatch(ctx->excludes->vector[i], bname, 0);
|
rc = csync_fnmatch(ctx->excludes->vector[i], bname, 0);
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
match = 1;
|
match = 1;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue