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

Commit 5a7c2105 authored by Daichi Hirono's avatar Daichi Hirono Committed by android-build-merger
Browse files

Merge "Fix the logic to add suffix when copying." into nyc-dev am: 07db6f39

am: e1a6c232

* commit 'e1a6c232':
  Fix the logic to add suffix when copying.
parents 6248dc0a e1a6c232
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -360,8 +360,12 @@ public class MtpDocumentsProvider extends DocumentsProvider {
                    if (i == 0) {
                        infoUniqueName = info;
                    } else {
                        infoUniqueName = new MtpObjectInfo.Builder(info).setName(
                                baseName + " (" + i + ")." + extension).build();
                        String suffixedName = baseName + " (" + i + " )";
                        if (!extension.isEmpty()) {
                            suffixedName += "." + extension;
                        }
                        infoUniqueName =
                                new MtpObjectInfo.Builder(info).setName(suffixedName).build();
                    }
                    try {
                        objectHandle = mMtpManager.createDocument(