viirya commented on code in PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#discussion_r939701199
##########
object_store/src/azure.rs:
##########
@@ -470,14 +470,15 @@ impl ObjectStore for MicrosoftAzure {
impl MicrosoftAzure {
/// helper function to create a source url for copy function
- fn get_copy_from_url(&self, from: &Path) -> Result<reqwest::Url> {
- Ok(reqwest::Url::parse(&format!(
- "{}/{}/{}",
- &self.blob_base_url, self.container_name, from
- ))
- .context(UnableToParseUrlSnafu {
- container: &self.container_name,
- })?)
+ fn get_copy_from_url(&self, from: &Path) -> Result<Url> {
+ let mut url =
+ Url::parse(&format!("{}/{}", &self.blob_base_url,
self.container_name))
+ .context(UnableToParseUrlSnafu {
+ container: &self.container_name,
+ })?;
+
+ url.path_segments_mut().unwrap().extend(from.parts());
Review Comment:
Oh, I see. Thanks for pointing to the doc. I thought it just simply extend
the content. 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]