Mola-maker opened a new issue, #9087:
URL: https://github.com/apache/opendal/issues/9087
### OpenDAL version or commit
main (f5ef36e)
### Affected service or component
integrations/unftp-sbe (`unftp-sbe-opendal`): `OpendalMetadata::modified`
### Describe the bug
`OpendalMetadata::modified` returns an error when the OpenDAL metadata has
no `last_modified`, for example for directories on `services::Memory`. libunftp
(unftp-core `Fileinfo`'s `Display`) then lists the entry with the date
placeholder `--- -- --:--`. `ls`-style parsers cannot read that line.
OpenDAL's own `ftp` service, which uses suppaftp, is one client that cannot
read it. It takes the **whole LIST line as the entry name**. As a result, a
directory it has just created cannot be stat'ed:
```
create_dir d/ Ok(())
stat d/ Err(NotFound) ... => file is not found during list
list / Ok(["drwxr-xr-x 1 0 0
0 --- -- --:-- d"])
```
### Steps to Reproduce
1. Serve `services::Memory` with `OpendalStorage` (libunftp 0.23).
2. Connect OpenDAL's `ftp` service to it and run `create_dir("d/")`,
`stat("d/")` and `list("/")`.
The ftp behavior suite against this server gives 63 passed.
### Actual Behavior
Entries without a modification time get an unparseable date. Clients drop
those entries or take the whole line as the entry's name.
### Expected Behavior
LIST lines stay parseable. The object_store integration already documents a
Unix-epoch default for backends without `last_modified`, and the same default
would work here.
### Reproduction confirmation
- [x] I reproduced this issue against the affected component. For a
service-specific report, I used the actual service rather than only a mock,
emulator, or source-code analysis.
### Are you willing to submit a PR to fix this bug?
- [x] Yes, I would like to submit a PR.
--
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]