tustvold commented on issue #384:
URL: 
https://github.com/apache/arrow-rs-object-store/issues/384#issuecomment-2914982653

   > why should control characters not be handled there as well?
   
   They are, `Path::from("\x01.txt).as_ref() == "%01.txt" `.
   
   As for why enforce this at the type level, it's all tradeoffs. Disallowing 
empty or relative path segments along with trailing (or leading) `/` is fairly 
integral to how path resolution functions w.r.t things like 
list_with_delimiter, etc... and therefore needs to be done at this level.
   
   Permitted characters is more subjective, we used to be even more strict, but 
this was loosened. IMO sticking control characters in what are meant to be 
human readable paths is not something that makes a great deal of sense to 
support.
   
   Ultimately object_store's goal has to make some opinionated decisions to 
make good on its portability promises. Excluding control characters is 
sufficient to ensure portability, with the sole exception of Windows 
filesystems (where the restrictions are so arcane as to be impractical to bake 
into 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-unsubscr...@arrow.apache.org

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

Reply via email to