From 9e3b77c3adf659de088b496df7bcaec4dc01f6c1 Mon Sep 17 00:00:00 2001 From: divinerapier Date: Wed, 24 Jul 2019 16:41:45 +0800 Subject: [PATCH] avoid double warpping Signed-off-by: divinerapier --- weed/filer2/filerstore.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.go index 231c7fc68..8caa44ee2 100644 --- a/weed/filer2/filerstore.go +++ b/weed/filer2/filerstore.go @@ -34,6 +34,9 @@ type FilerStoreWrapper struct { } func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper { + if innerStore, ok := store.(*FilerStoreWrapper); ok { + return innerStore + } return &FilerStoreWrapper{ actualStore: store, }