You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by GitBox <gi...@apache.org> on 2023/03/25 10:26:30 UTC

[GitHub] [incubator-opendal] Xuanwo added a comment to the discussion: Allow users to opt-out creating `root` dir when building `Fs` backend

GitHub user Xuanwo added a comment to the discussion: Allow users to opt-out creating `root` dir when building `Fs` backend

> Users might not create a fs backend with a non-existent root on purpose.

That's true.

> For instance I once tested `oli cat` by reading a local file and I mistyped the path, like `oli cat /tmp/not-exist/foo`, and then a dir named `non-exist` was created under `/tmp`.

Actually, `oli` must avoid using `/tmp/not-exist` as the root directory. Instead, all serivces should stick to `/` as root to make the internal logic cleaner.

> Another case is that if I run the test [test_parse_fs_location](https://github.com/apache/incubator-opendal/blob/0069c92af7f6a4380653caa01276776031ef03e9/bin/oli/src/config/mod.rs#L304-L312) locally, a dir named `foo/bar` will be created under PWD, which supprises me as no read/write operation is actually performed.

This is the same issue as I statemented in last comment.

---

Thank you for the proposal, but I don't think it's a significant enough issue to warrant a change.

GitHub link: https://github.com/apache/incubator-opendal/discussions/1765#discussioncomment-5425812

----
This is an automatically sent email for commits@opendal.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@opendal.apache.org