avoid double warpping

Signed-off-by: divinerapier <poriter.coco@gmail.com>
This commit is contained in:
divinerapier 2019-07-24 16:41:45 +08:00
parent 344ce90315
commit 9e3b77c3ad

View File

@ -34,6 +34,9 @@ type FilerStoreWrapper struct {
}
func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper {
if innerStore, ok := store.(*FilerStoreWrapper); ok {
return innerStore
}
return &FilerStoreWrapper{
actualStore: store,
}