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 07:25:39 UTC

[GitHub] [arrow] jorisvandenbossche commented on pull request #13577: ARROW-17045: [C++] Ignore trailing slashes on files in GCS

jorisvandenbossche commented on PR #13577:
URL: https://github.com/apache/arrow/pull/13577#issuecomment-1181412377

   Just wondering: to what extent is this a corner case that just happens to be in our tests, or is there a practical value in allowing trailing slashes? 
   
   Because for example also the LocalFileSystem does not allow trailing slashes in a similar example:
   
   ```
   In [51]: from pyarrow.fs import LocalFileSystem
   
   In [52]: local = LocalFileSystem()
   
   In [53]: local.create_dir("py-test")
   
   In [54]: with local.open_output_stream("py-test/test.txt/") as out_stream:
       ...:     out_stream.write(b"Hello world!")
   ...
   IsADirectoryError: [Errno 21] Failed to open local file 'py-test/test.txt/'
   Detail: [errno 21] Is a directory
   ```
   
   (which is an error that makes sense to me, also Python's `open` will complain that it is a directory and not a file in the equivalent example)


-- 
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