Xuanwo opened a new pull request, #8914:
URL: https://github.com/apache/opendal/pull/8914

   # Which issue does this PR close?
   
   None. Found during maintenance; no separate issue was filed.
   
   # Rationale for this change
   
   `compfs` mishandled several local-filesystem edge cases:
   
   - `copy` from a directory path without a trailing slash opened and truncated 
the destination before the source read failed.
   - Listing replaced backslashes with slashes on Unix, where backslash is a 
valid filename character.
   - A single `Buffer` with more than `IOV_MAX` (1024) chunks failed with 
`EINVAL`.
   - Listing a file path returned an error, and `rename` created destination 
parent directories before confirming the source existed.
   
   # What changes are included in this PR?
   
   - Check source metadata before opening or truncating a copy destination, 
returning `IsADirectory` for directories and `NotFound` for missing sources.
   - Only normalize backslashes in listed paths on Windows.
   - Submit at most 1024 slices per vectored write while preserving the writer 
position across batches.
   - Treat `NotFound` and `NotADirectory` as an empty listing, and validate 
rename sources before creating destination parents in both rename paths.
   - Add regression tests covering each fixed behavior.
   
   # Are there any user-facing changes?
   
   Yes. These invalid or edge-case operations now return the documented error 
kinds without leaving partial files or directories behind, and valid Unix 
filenames containing backslashes are no longer corrupted during listing.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Pi
   - Model: DeepSeek V4.1 Flash
   - Effort: max
   - Role: Implemented the fixes and regression tests, and verified them with 
the `opendal-service-compfs` unit tests, clippy, rustdoc, and the compfs 
behavior suite.


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

Reply via email to