Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
remove unnecessary percent encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbifish committed Aug 20, 2019
1 parent ed630eb commit 5bb2d45
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/commands/kv/write_bulk.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -102,9 +101,6 @@ fn generate_key(path: &Path, directory: &Path) -> Result<String, failure::Error>
"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())
}

0 comments on commit 5bb2d45

Please sign in to comment.