mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
Check if dir is ignored and if file exists when record "index error" (#2863)
* Check if dir is ignored and record index error when file exists * Check if file exists --------- Co-authored-by: yangheran <heran.yang@seafile.com>
This commit is contained in:
parent
92af45825e
commit
84477411f6
@ -1756,8 +1756,11 @@ add_file (const char *repo_id,
|
|||||||
S_IFREG,
|
S_IFREG,
|
||||||
SYNC_STATUS_ERROR,
|
SYNC_STATUS_ERROR,
|
||||||
TRUE);
|
TRUE);
|
||||||
send_file_sync_error_notification (repo_id, NULL, path,
|
// Only record index error when the file exists.
|
||||||
SYNC_ERROR_ID_INDEX_ERROR);
|
if (seaf_util_exists (full_path)) {
|
||||||
|
send_file_sync_error_notification (repo_id, NULL, path,
|
||||||
|
SYNC_ERROR_ID_INDEX_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -1806,8 +1809,10 @@ add_dir_recursive (const char *path, const char *full_path, SeafStat *st,
|
|||||||
S_IFDIR,
|
S_IFDIR,
|
||||||
SYNC_STATUS_ERROR,
|
SYNC_STATUS_ERROR,
|
||||||
TRUE);
|
TRUE);
|
||||||
send_file_sync_error_notification (params->repo_id, NULL, path,
|
if (!ignored) {
|
||||||
SYNC_ERROR_ID_INDEX_ERROR);
|
send_file_sync_error_notification (params->repo_id, NULL, path,
|
||||||
|
SYNC_ERROR_ID_INDEX_ERROR);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2144,8 +2149,10 @@ add_dir_recursive (const char *path, const char *full_path, SeafStat *st,
|
|||||||
S_IFDIR,
|
S_IFDIR,
|
||||||
SYNC_STATUS_ERROR,
|
SYNC_STATUS_ERROR,
|
||||||
TRUE);
|
TRUE);
|
||||||
send_file_sync_error_notification (params->repo_id, NULL, path,
|
if (!ignored) {
|
||||||
SYNC_ERROR_ID_INDEX_ERROR);
|
send_file_sync_error_notification (params->repo_id, NULL, path,
|
||||||
|
SYNC_ERROR_ID_INDEX_ERROR);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2699,8 +2706,10 @@ add_remain_files (SeafRepo *repo, struct index_state *istate,
|
|||||||
S_IFREG,
|
S_IFREG,
|
||||||
SYNC_STATUS_ERROR,
|
SYNC_STATUS_ERROR,
|
||||||
TRUE);
|
TRUE);
|
||||||
send_file_sync_error_notification (repo->id, NULL, path,
|
if (seaf_util_exists (full_path)) {
|
||||||
SYNC_ERROR_ID_INDEX_ERROR);
|
send_file_sync_error_notification (repo->id, NULL, path,
|
||||||
|
SYNC_ERROR_ID_INDEX_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (S_ISDIR(st.st_mode)) {
|
} else if (S_ISDIR(st.st_mode)) {
|
||||||
if (is_empty_dir (full_path, ignore_list)) {
|
if (is_empty_dir (full_path, ignore_list)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user