Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 663f9d8a authored by Jon Mann's avatar Jon Mann
Browse files

Document rename with no change is now a no-op instead of an error.

Test: verified existing tests still work
Bug: 35673019
Change-Id: Ie4fe663b0e76bb5389b00b75b4cc6686bcf02f21
parent 97e21013
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -188,7 +188,9 @@ public class RenameDocumentFragment extends DialogFragment {
    private void renameDocuments(String newDisplayName) {
        BaseActivity activity = (BaseActivity) getActivity();

        if (!isValidDocumentName(newDisplayName)) {
        if (newDisplayName.equals(mDocument.displayName)) {
            mDialog.dismiss();
        } else if (!isValidDocumentName(newDisplayName)) {
            Log.w(TAG, "Failed to rename file - invalid name:" + newDisplayName);
            Snackbars.makeSnackbar(getActivity(), R.string.rename_error,
                    Snackbar.LENGTH_SHORT).show();