Эх сурвалжийг харах

Checking Folder Error failed uploads

masensio 9 жил өмнө
parent
commit
15d5350ef6

+ 1 - 0
res/values/strings.xml

@@ -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>

+ 4 - 4
src/com/owncloud/android/db/UploadResult.java

@@ -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:

+ 3 - 0
src/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java

@@ -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();
                         }