mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
handle repo too large error
This commit is contained in:
parent
eed7fa2250
commit
ed60d7afaa
@ -38,10 +38,12 @@
|
||||
|
||||
#define HTTP_OK 200
|
||||
#define HTTP_BAD_REQUEST 400
|
||||
#define HTTP_REQUEST_TIME_OUT 408
|
||||
#define HTTP_FORBIDDEN 403
|
||||
#define HTTP_NOT_FOUND 404
|
||||
#define HTTP_NO_QUOTA 443
|
||||
#define HTTP_REPO_DELETED 444
|
||||
#define HTTP_REPO_TOO_LARGE 447
|
||||
#define HTTP_REPO_CORRUPTED 445
|
||||
#define HTTP_INTERNAL_SERVER_ERROR 500
|
||||
|
||||
@ -1089,6 +1091,8 @@ http_error_to_http_task_error (int status)
|
||||
return SYNC_ERROR_ID_SERVER_REPO_DELETED;
|
||||
else if (status == HTTP_REPO_CORRUPTED)
|
||||
return SYNC_ERROR_ID_SERVER_REPO_CORRUPT;
|
||||
else if (status == HTTP_REPO_TOO_LARGE || status == HTTP_REQUEST_TIME_OUT)
|
||||
return SYNC_ERROR_ID_LIBRARY_TOO_LARGE;
|
||||
else
|
||||
return SYNC_ERROR_ID_GENERAL_ERROR;
|
||||
}
|
||||
|
@ -169,6 +169,11 @@ static SyncErrorInfo sync_error_info_tbl[] = {
|
||||
SYNC_ERROR_LEVEL_FILE,
|
||||
"File or directory is invalid on Windows"
|
||||
},
|
||||
{
|
||||
SYNC_ERROR_ID_LIBRARY_TOO_LARGE,
|
||||
SYNC_ERROR_LEVEL_REPO,
|
||||
"Library is too large to sync"
|
||||
},
|
||||
};
|
||||
|
||||
const char *
|
||||
|
@ -61,6 +61,7 @@
|
||||
#define SYNC_ERROR_ID_NO_ERROR 29
|
||||
#define SYNC_ERROR_ID_REMOVE_UNCOMMITTED_FOLDER 30
|
||||
#define SYNC_ERROR_ID_INVALID_PATH_ON_WINDOWS 31
|
||||
#define N_SYNC_ERROR_ID 32
|
||||
#define SYNC_ERROR_ID_LIBRARY_TOO_LARGE 32
|
||||
#define N_SYNC_ERROR_ID 33
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user