2020IP / TwentyTwenty.Storage

A cross-cloud storage abstraction
Other
100 stars 26 forks source link

Liskov Substitution Principle violations #48

Open jahav opened 1 month ago

jahav commented 1 month ago

The library violates LSP. The consequence is that it is not possible to switch from one IStorageProvider to another without making changes reflecting the changed behaviour.

Examples: LocalStorageProvider - Names from GetBlobDescriptorAsync and ListBlobsAsync are only the last name, without full path in a container (e.g. flowers/flower.jpg will return only flower.jpg). When blob is not found, I get StorageErrorCode.GenericError. AzureStorageProvider - Names from GetBlobDescriptorAsync and ListBlobsAsync are only the last name, without full path in a container (e.g. flowers/flower.jpg will return flowers/flower.jpg). When blob is not found, I get StorageErrorCode.NotFound.

I can make a PR, if you are interested in solving this.