projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #918 from owncloud/share_password_support
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
utils
/
ErrorMessageAdapter.java
diff --git
a/src/com/owncloud/android/utils/ErrorMessageAdapter.java
b/src/com/owncloud/android/utils/ErrorMessageAdapter.java
index
9e077c0
..
12a1a5a
100644
(file)
--- a/
src/com/owncloud/android/utils/ErrorMessageAdapter.java
+++ b/
src/com/owncloud/android/utils/ErrorMessageAdapter.java
@@
-1,4
+1,7
@@
-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author masensio
* Copyright (C) 2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* Copyright (C) 2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
@@
-41,10
+44,8
@@
import com.owncloud.android.operations.UnshareLinkOperation;
import com.owncloud.android.operations.UploadFileOperation;
/**
import com.owncloud.android.operations.UploadFileOperation;
/**
- * Class to choose proper error messages to show to the user depending on the results of operations, always following the same policy
- *
- * @author masensio
- *
+ * Class to choose proper error messages to show to the user depending on the results of operations,
+ * always following the same policy
*/
public class ErrorMessageAdapter {
*/
public class ErrorMessageAdapter {
@@
-210,13
+211,16
@@
public class ErrorMessageAdapter {
} else if (operation instanceof SynchronizeFolderOperation) {
if (!result.isSuccess()) {
} else if (operation instanceof SynchronizeFolderOperation) {
if (!result.isSuccess()) {
+ String folderPathName = new File(
+ ((SynchronizeFolderOperation) operation).getFolderPath()).getName();
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
- message = res.getString(R.string.download_folder_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
} else { // Generic error
// Show a Message, operation finished without success
- message = String.format(res.getString(R.string.download
er_download_folder_failed_content), new File(
-
((SynchronizeFolderOperation) operation).getFolderPath()).getName()
);
+ message = String.format(res.getString(R.string.download
_folder_failed_content),
+
folderPathName
);
}
}
}
}
}
}