bug: multiple file with same name in google drive crash
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
### Describe the bug
While _debugging_ and trying to list a google drive, if multiple files have the same name exactly, the application crash.
For some reason, GoogleDrive allows multiple files to have exactly the same name.
This is handled [here](https://github.com/apache/opendal/blob/cf7b9ab61c79f85a9f78a90a7f338d09dfc749a5/core/src/raw/path_cache.rs#L99) and this check is disabled in release mode.
### Steps to Reproduce
Connect to a google drive with two files having exactly the same name and do a `op.list(...)`
### Expected Behavior
I guess the simplest is to completely ignore the file and not crash or simply log an error somewhere.
At least, the error and comment should be more precise.
### Additional Context
I'm new to the library, sorry if it's the expected behavior or if there's another issue about it. I couldn't find anything about that.
### Are you willing to submit a PR to fix this bug?
- [ ] Yes, I would like to submit a PR.
Contributor guide
Research direction
Start at core/src/raw/path_cache.rs around the linked check and reproduce the issue by calling op.list(...) on a Google Drive containing duplicate filenames. Determine the intended handling for duplicate names; done means listing no longer crashes and the error or comment accurately describes the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100