keen85 opened a new issue, #483:
URL: https://github.com/apache/arrow-rs-object-store/issues/483

   **Describe the bug**
   Executing LocalFileSystem.head() on an existing directory on Windows results 
in `PermissionDenied` error.
   
   **To Reproduce**
   I encountered the bug using `obstore` - a Python wrapper for `object_store`.
   Unfortunately I don't know rust.
   This is the snippet that I used for reproducing the bug in Python & 
`obstore`:
   https://github.com/developmentseed/obstore/pull/557
   ```python
   def test_head(tmp_path: Path):
       store = LocalStore(tmp_path)
       # create a dummy file in a new sub directory
       store.put("freshly_created/some.txt", b"foo")
   
       # ✅ works fine
       assert store.head("freshly_created/some.txt")["path"] == 
"freshly_created/some.txt"
   
       # 🛑 fails on windows
       assert store.head("freshly_created")["path"] == "freshly_created"
   ```
   I hope that it suffices.
   
   **Expected behavior**
   `head()` should return metadata on the directory - i.e. at the information 
that the *path is a directory*.


-- 
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.apache.org

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

Reply via email to