@Override
public void onNeutral(String callerTag) {
- File f = null;
OCFile file = getFile();
- if (file.isDown() && (f = new File(file.getStoragePath())).exists()) {
- f.delete();
+ mStorageManager.removeFile(file, false, true); // TODO perform in background task / new thread
+ if (file.getStoragePath() != null) {
file.setStoragePath(null);
- mStorageManager.saveFile(file);
updateFileDetails(file, mAccount);
}
}
Toast msg = Toast.makeText(getActivity(), R.string.rename_local_fail_msg, Toast.LENGTH_LONG);
msg.show();
// TODO throw again the new rename dialog
+ } if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
+ Toast msg = Toast.makeText(getActivity(), R.string.filename_forbidden_characters, Toast.LENGTH_LONG);
+ msg.show();
} else {
Toast msg = Toast.makeText(getActivity(), R.string.rename_server_fail_msg, Toast.LENGTH_LONG);
msg.show();