Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ async fn resolve_query_target_dc_label(

fn serialize_actor_key(key: &[String]) -> Result<String> {
const EMPTY_KEY: &str = "/";
const KEY_SEPARATOR: char = '/';
const KEY_SEPARATOR: &str = "/";
const KEY_SEPARATOR_CHAR: char = '/';

if key.is_empty() {
return Ok(EMPTY_KEY.to_string());
Expand All @@ -221,11 +222,13 @@ fn serialize_actor_key(key: &[String]) -> Result<String> {
continue;
}

let escaped = part.replace('\\', "\\\\").replace(KEY_SEPARATOR, "\\/");
let escaped = part
.replace('\\', "\\\\")
.replace(KEY_SEPARATOR_CHAR, "\\/");
escaped_parts.push(escaped);
}

Ok(escaped_parts.join(EMPTY_KEY))
Ok(escaped_parts.join(KEY_SEPARATOR))
}

fn is_duplicate_key_error(err: &anyhow::Error) -> bool {
Expand Down
Loading