mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Updater: Ignore files matching with CSYNC_CONFLICT_FILE_USERNAME
This commit is contained in:
parent
197d180cb9
commit
94f380c1f0
1 changed files with 14 additions and 0 deletions
|
@ -144,6 +144,7 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
|
|||
char *bname = NULL;
|
||||
char *dname = NULL;
|
||||
char *prev_dname = NULL;
|
||||
char *conflict = NULL;
|
||||
int rc = -1;
|
||||
CSYNC_EXCLUDE_TYPE match = CSYNC_NOT_EXCLUDED;
|
||||
CSYNC_EXCLUDE_TYPE type = CSYNC_NOT_EXCLUDED;
|
||||
|
@ -200,6 +201,19 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (getenv("CSYNC_CONFLICT_FILE_USERNAME")) {
|
||||
asprintf(&conflict, "*_conflict_%s-*", getenv("CSYNC_CONFLICT_FILE_USERNAME"));
|
||||
rc = csync_fnmatch(conflict, path, 0);
|
||||
if (rc == 0) {
|
||||
match = CSYNC_FILE_SILENTLY_EXCLUDED;
|
||||
SAFE_FREE(conflict);
|
||||
SAFE_FREE(bname);
|
||||
SAFE_FREE(dname);
|
||||
goto out;
|
||||
}
|
||||
SAFE_FREE(conflict);
|
||||
}
|
||||
|
||||
SAFE_FREE(bname);
|
||||
SAFE_FREE(dname);
|
||||
|
||||
|
|
Loading…
Reference in a new issue