tustvold commented on code in PR #2269:
URL: https://github.com/apache/arrow-rs/pull/2269#discussion_r934728334
##########
object_store/src/local.rs:
##########
@@ -214,10 +225,11 @@ impl LocalFileSystem {
impl Config {
/// Return filesystem path of the given location
- fn path_to_filesystem(&self, location: &Path) ->
Result<std::path::PathBuf> {
+ fn path_to_filesystem(&self, location: &Path) -> Result<PathBuf> {
let mut url = self.root.clone();
url.path_segments_mut()
.expect("url path")
+ .pop_if_empty()
Review Comment:
Drive by fix, this technically isn't necessary as `Path` ignores empty
segments, but this avoids creating paths with "//" which look odd in error
messages.
--
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]