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

Commit e1a6c232 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

* commit '07db6f39':
  Fix the logic to add suffix when copying.
parents 6b8e2c08 07db6f39
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(