mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Fix a segfault if we don't find an exlcude list.
This commit is contained in:
parent
25e300c462
commit
5a2fa7f563
1 changed files with 4 additions and 0 deletions
|
@ -104,6 +104,10 @@ void csync_exclude_destroy(CSYNC *ctx) {
|
||||||
int csync_excluded(CSYNC *ctx, const char *path) {
|
int csync_excluded(CSYNC *ctx, const char *path) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
if (ctx->excludes == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->excludes->count) {
|
if (ctx->excludes->count) {
|
||||||
for (i = 0; i < ctx->excludes->count; i++) {
|
for (i = 0; i < ctx->excludes->count; i++) {
|
||||||
if (fnmatch(ctx->excludes->vector[i], path, 0) == 0) {
|
if (fnmatch(ctx->excludes->vector[i], path, 0) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue