Checking Folder Error failed uploads

This commit is contained in:
masensio 2016-01-25 14:23:23 +01:00
parent 198c1bf3b0
commit 15d5350ef6
3 changed files with 8 additions and 4 deletions

View file

@ -124,6 +124,7 @@
<string name="uploads_view_upload_status_failed_connection_error">Connection error</string>
<string name="uploads_view_upload_status_failed_retry">Upload will be retried shortly</string>
<string name="uploads_view_upload_status_failed_credentials_error">Credentials error</string>
<string name="uploads_view_upload_status_failed_folder_error">Folder error</string>
<string name="downloader_download_in_progress_ticker">Downloading &#8230;</string>
<string name="downloader_download_in_progress_content">%1$d%% Downloading %2$s</string>
<string name="downloader_download_succeeded_ticker">Download succeeded</string>

View file

@ -80,12 +80,12 @@ public enum UploadResult {
case ACCOUNT_EXCEPTION:
case UNAUTHORIZED:
return CREDENTIAL_ERROR;
// case
// return FOLDER_ERROR;
case FILE_NOT_FOUND:
return FOLDER_ERROR;
case CONFLICT:
return CONFLICT_ERROR;
case FILE_NOT_FOUND:
return FILE_ERROR;
// case FILE_NOT_FOUND:
// return FILE_ERROR;
// case UNAUTHORIZED:
// return PRIVILEDGES_ERROR;
case CANCELLED:

View file

@ -229,6 +229,9 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
mParentActivity.startActivity(updateAccountCredentials);
}
});
} else if (upload.getLastResult() == UploadResult.FOLDER_ERROR) {
status = mParentActivity.getString(
R.string.uploads_view_upload_status_failed_folder_error);
} else {
status = "Upload failed: " + upload.getLastResult().toString();
}