This repository was archived by the owner on Mar 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1+ // ModelsAndManagers.swift
12import Foundation
23
34// MARK: - FileItem
@@ -150,7 +151,7 @@ class CertificateFileManager {
150151 return name. components ( separatedBy: invalidChars) . joined ( separator: " _ " )
151152 }
152153
153- // Return a unique display name by appending " 2 ", " 3 ", ... if needed.
154+ // Return a unique display name by appending " 1 ", " 2 ", ... if needed.
154155 // `excludingFolder` lets updateCertificate keep the current folder's name out of the conflict check.
155156 private func uniqueDisplayName( _ desired: String , excludingFolder: String ? = nil ) -> String {
156157 let base = desired. isEmpty ? " Custom Certificate " : desired
@@ -172,7 +173,7 @@ class CertificateFileManager {
172173 return base
173174 }
174175
175- var counter = 2
176+ var counter = 1
176177 while existingNames. contains ( " \( base) \( counter) " ) {
177178 counter += 1
178179 }
@@ -194,4 +195,4 @@ enum PickerKind: Identifiable {
194195enum CertificatePickerKind : Identifiable {
195196 case p12, prov
196197 var id : Self { self }
197- }
198+ }
You can’t perform that action at this time.
0 commit comments