diff --git a/src/reticulum/IdentityManager.cpp b/src/reticulum/IdentityManager.cpp index 794be75..ce4aa8a 100644 --- a/src/reticulum/IdentityManager.cpp +++ b/src/reticulum/IdentityManager.cpp @@ -84,8 +84,10 @@ String IdentityManager::importIdentityPath() const { entry.close(); String lower = name; lower.toLowerCase(); - bool legacyIdentityKey = lower == "identity.key" || lower.endsWith("/identity.key"); - bool importCandidate = lower.endsWith(".identity") || (lower.endsWith(".key") && !legacyIdentityKey); + bool reservedIdentityFile = lower == "identity.key" || lower.endsWith("/identity.key") || + lower == "identity.identity" || lower.endsWith("/identity.identity"); + bool importCandidate = !reservedIdentityFile && + (lower.endsWith(".identity") || lower.endsWith(".key")); if (importCandidate) { candidate = name.startsWith("/") ? name : String(SD_PATH_IDENTITY_DIR) + "/" + name; candidates++; diff --git a/src/ui/screens/LvSettingsScreen.cpp b/src/ui/screens/LvSettingsScreen.cpp index a08a82a..d2bb8c1 100644 --- a/src/ui/screens/LvSettingsScreen.cpp +++ b/src/ui/screens/LvSettingsScreen.cpp @@ -482,8 +482,9 @@ void LvSettingsScreen::buildItems() { if (!entry.isDirectory()) { String name = entry.name(); name.toLowerCase(); - bool legacyIdentityKey = name == "identity.key" || name.endsWith("/identity.key"); - if (name.endsWith(".identity") || (name.endsWith(".key") && !legacyIdentityKey)) { + bool reservedIdentityFile = name == "identity.key" || name.endsWith("/identity.key") || + name == "identity.identity" || name.endsWith("/identity.identity"); + if (!reservedIdentityFile && (name.endsWith(".identity") || name.endsWith(".key"))) { identityFiles++; } }