Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if dir is ignored and record index error when file exists #2863

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions daemon/repo-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,11 @@ add_file (const char *repo_id,
S_IFREG,
SYNC_STATUS_ERROR,
TRUE);
send_file_sync_error_notification (repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
// Only record index error when the file exists.
if (seaf_util_exists (full_path)) {
send_file_sync_error_notification (repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
}
}

return ret;
Expand Down Expand Up @@ -1783,8 +1786,10 @@ add_dir_recursive (const char *path, const char *full_path, SeafStat *st,
S_IFDIR,
SYNC_STATUS_ERROR,
TRUE);
send_file_sync_error_notification (params->repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
if (!ignored) {
send_file_sync_error_notification (params->repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
}
return 0;
}

Expand Down Expand Up @@ -2121,8 +2126,10 @@ add_dir_recursive (const char *path, const char *full_path, SeafStat *st,
S_IFDIR,
SYNC_STATUS_ERROR,
TRUE);
send_file_sync_error_notification (params->repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
if (!ignored) {
send_file_sync_error_notification (params->repo_id, NULL, path,
SYNC_ERROR_ID_INDEX_ERROR);
}
return 0;
}

Expand Down