@@ -21,7 +21,7 @@ final class EtcdPluginDriver: PluginDatabaseDriver, @unchecked Sendable {
2121 lock. withLock { _httpClient }
2222 }
2323
24- private static let logger = Logger ( subsystem: " com.TablePro.EtcdDriver " , category: " EtcdPluginDriver " )
24+ private static let logger = Logger ( subsystem: " com.TablePro " , category: " EtcdPluginDriver " )
2525 private static let maxKeys = PluginRowLimits . defaultMax
2626
2727
@@ -213,7 +213,7 @@ final class EtcdPluginDriver: PluginDatabaseDriver, @unchecked Sendable {
213213
214214 // Skip leading "/" when finding the first segment
215215 let searchStart : String . Index
216- if relative. hasPrefix ( " / " ) && relative. count > 1 {
216+ if relative. hasPrefix ( " / " ) , relative . index ( after : relative. startIndex ) < relative . endIndex {
217217 searchStart = relative. index ( after: relative. startIndex)
218218 } else {
219219 searchStart = relative. startIndex
@@ -919,8 +919,8 @@ final class EtcdPluginDriver: PluginDatabaseDriver, @unchecked Sendable {
919919 /// Empty prefix uses null byte (\0) as key to mean "all keys".
920920 private static func allKeysRange( for prefix: String ) -> ( key: String , rangeEnd: String ) {
921921 if prefix. isEmpty {
922- // \0 as key = start from beginning, \0 as range_end = all keys
923- let b64Key = EtcdHttpClient . base64Encode ( " \0 " )
922+ // Empty key = start from beginning, \0 as range_end = all keys
923+ let b64Key = EtcdHttpClient . base64Encode ( " " )
924924 let b64RangeEnd = EtcdHttpClient . base64Encode ( " \0 " )
925925 return ( b64Key, b64RangeEnd)
926926 }
0 commit comments