Skip to content

Commit

Permalink
Refactored root bundle identifier to not use a while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
charliescheer committed May 31, 2024
1 parent e68c290 commit c279f3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Simplenote/Bundle+Simplenote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ extension Bundle {
}

var url = bundleURL
while !url.lastPathComponent.hasSuffix(Constants.appSuffix) {

for component in url.pathComponents.reversed() {
guard !component.hasSuffix(Constants.appSuffix) else {
break
}
url.deleteLastPathComponent()
}

Expand Down

0 comments on commit c279f3b

Please sign in to comment.