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

   ## Summary
   
   Fixes the test failures reported in #7059 by ensuring directory paths always 
end with a trailing `/`.
   
   ## Problem
   
   The `debug_assert` in `oio::Entry` requires that paths with `EntryMode::DIR` 
must end with `/`:
   ```rust
   debug_assert!(
       meta.mode().is_dir() == path.ends_with('/'),
       "mode {:?} not match with path {}",
   );
   ```
   
   Both `GdriveLister` and `GdriveFlatLister` were creating directory entries 
without ensuring the trailing slash, causing test failures:
   
   - `test_list_prefix`
   - `test_list_empty_dir`
   - `test_remove_all_basic`
   - `test_list_dir_with_file_path`
   - `test_list_file_with_recursive`
   - `test_list_dir_with_recursive_no_trailing_slash`
   
   ## Fix
   
   Added path normalization to ensure directory paths end with `/` before 
creating `oio::Entry` with `EntryMode::DIR` in both lister implementations.
   
   ---
   
   Follow-up fix to #7059 based on @Xuanwo's [test 
results](https://github.com/apache/opendal/pull/7059#issuecomment-3675536631).


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