You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/12 20:51:33 UTC

[GitHub] [arrow] nealrichardson commented on a diff in pull request #13577: ARROW-17045: [C++] Reject trailing slashes on file path

nealrichardson commented on code in PR #13577:
URL: https://github.com/apache/arrow/pull/13577#discussion_r919416391


##########
r/R/io.R:
##########
@@ -241,7 +241,7 @@ mmap_open <- function(path, mode = c("read", "write", "readwrite")) {
 make_readable_file <- function(file, mmap = TRUE, compression = NULL, filesystem = NULL) {
   if (inherits(file, "SubTreeFileSystem")) {
     filesystem <- file$base_fs
-    file <- file$base_path
+    file <- gsub("/$", "", file$base_path)

Review Comment:
   nit: no need for global substitution
   
   ```suggestion
       file <- sub("/$", "", file$base_path)
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org