+ } else if (operation instanceof SynchronizeFolderOperation) {
+
+ if (!result.isSuccess()) {
+ String folderPathName = new File(
+ ((SynchronizeFolderOperation) operation).getFolderPath()).getName();
+ if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
+ message = String.format(res.getString(R.string.sync_current_folder_was_removed),
+ folderPathName);
+
+ } else { // Generic error
+ // Show a Message, operation finished without success
+ message = String.format(res.getString(R.string.sync_folder_failed_content),
+ folderPathName);
+ }
+ }
+ } else if (operation instanceof CopyFileOperation) {
+ if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
+ message = res.getString(R.string.copy_file_not_found);
+ } else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
+ message = res.getString(R.string.copy_file_invalid_into_descendent);
+
+ } else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
+ message = res.getString(R.string.copy_file_invalid_overwrite);
+
+ } else if (result.getCode() == ResultCode.FORBIDDEN) {
+ message = String.format(res.getString(R.string.forbidden_permissions),
+ res.getString(R.string.forbidden_permissions_copy));
+
+ } else { // Generic error
+ // Show a Message, operation finished without success
+ message = res.getString(R.string.copy_file_error);
+ }