diff --git a/src/commands/kv/write_bulk.rs b/src/commands/kv/write_bulk.rs index 5b709f680..e3406c4fb 100644 --- a/src/commands/kv/write_bulk.rs +++ b/src/commands/kv/write_bulk.rs @@ -1,7 +1,6 @@ extern crate base64; use cloudflare::framework::apiclient::ApiClient; -use percent_encoding::{percent_encode, PATH_SEGMENT_ENCODE_SET}; use walkdir::WalkDir; use std::ffi::OsString; @@ -102,9 +101,6 @@ fn generate_key(path: &Path, directory: &Path) -> Result "found a non-UTF-8 path, {:?}", path_with_forward_slash )); - let path_bytes = path.as_bytes(); - // we use PATH_SEGMENT_ENCODE_SET since we're encoding paths, this will turn / into %2F, - // which is needed for the API call to put a `/` into the key. - Ok(percent_encode(path_bytes, PATH_SEGMENT_ENCODE_SET).to_string()) + Ok(path.to_string()) }