opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Make opendal's path normalization logic more clear in public API

Open Xuanwo opened this issue 1 year ago • 2 comments

As reported from discord:

Shouldn't this be highlighted in the docs for bucket-type storages (correct me if already there)?

https://discord.com/channels/1081052318650339399/1201596970112917646

Xuanwo avatar Jan 30 '24 12:01 Xuanwo

@Xuanwo As it stands, many otherwise valid read/write requests are deemed invalid due to path normalization. Do you think implementation of path normalization should be done differently for different services?

hubcycle avatar Jan 31 '24 08:01 hubcycle

Do you think implementation of path normalization should be done differently for different services?

OpenDAL's vision is to access data freely, ensuring consistent user experience across various services.

Path normalization is useful in cases like writing a///b. On S3, it will be a///b, but on the file system, it will be a/b. It's very common for users to incorrectly join or concatenate paths.

OpenDAL does not aim to support use cases involving writing a///b to storage services. Thus I think we don't need to perform different path normalization on different services.

Xuanwo avatar Jan 31 '24 08:01 Xuanwo