File tree Expand file tree Collapse file tree
engine/packages/guard/src/routing/pegboard_gateway Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,7 +216,8 @@ async fn resolve_query_target_dc_label(
216216
217217fn serialize_actor_key ( key : & [ String ] ) -> Result < String > {
218218 const EMPTY_KEY : & str = "/" ;
219- const KEY_SEPARATOR : char = '/' ;
219+ const KEY_SEPARATOR : & str = "/" ;
220+ const KEY_SEPARATOR_CHAR : char = '/' ;
220221
221222 if key. is_empty ( ) {
222223 return Ok ( EMPTY_KEY . to_string ( ) ) ;
@@ -229,11 +230,13 @@ fn serialize_actor_key(key: &[String]) -> Result<String> {
229230 continue ;
230231 }
231232
232- let escaped = part. replace ( '\\' , "\\ \\ " ) . replace ( KEY_SEPARATOR , "\\ /" ) ;
233+ let escaped = part
234+ . replace ( '\\' , "\\ \\ " )
235+ . replace ( KEY_SEPARATOR_CHAR , "\\ /" ) ;
233236 escaped_parts. push ( escaped) ;
234237 }
235238
236- Ok ( escaped_parts. join ( EMPTY_KEY ) )
239+ Ok ( escaped_parts. join ( KEY_SEPARATOR ) )
237240}
238241
239242fn is_duplicate_key_error ( err : & anyhow:: Error ) -> bool {
You can’t perform that action at this time.
0 commit comments