diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-12-31 11:52:54 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-12-31 11:52:54 -0800 |
| commit | 86d4b18eb5e7ebc813f2e11d6826a9ace384cd61 (patch) | |
| tree | ddcdb9b2f4961eec885dcf7f812915341d3cb154 /weed/server/filer_server.go | |
| parent | 09043c8e5a3b43add589344d28d4f57e90c83f70 (diff) | |
| download | seaweedfs-86d4b18eb5e7ebc813f2e11d6826a9ace384cd61.tar.xz seaweedfs-86d4b18eb5e7ebc813f2e11d6826a9ace384cd61.zip | |
filer: optional recursive deletion
fix https://github.com/chrislusf/seaweedfs/issues/1176
Diffstat (limited to 'weed/server/filer_server.go')
| -rw-r--r-- | weed/server/filer_server.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index 41ba81366..c703b8c6f 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -7,11 +7,14 @@ import ( "os" "time" + "google.golang.org/grpc" + "github.com/chrislusf/seaweedfs/weed/operation" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "github.com/chrislusf/seaweedfs/weed/stats" "github.com/chrislusf/seaweedfs/weed/util" - "google.golang.org/grpc" + + "github.com/spf13/viper" "github.com/chrislusf/seaweedfs/weed/filer2" _ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra" @@ -30,7 +33,6 @@ import ( _ "github.com/chrislusf/seaweedfs/weed/notification/kafka" _ "github.com/chrislusf/seaweedfs/weed/notification/log" "github.com/chrislusf/seaweedfs/weed/security" - "github.com/spf13/viper" ) type FilerOption struct { @@ -45,6 +47,7 @@ type FilerOption struct { DefaultLevelDbDir string DisableHttp bool Port int + recursiveDelete bool } type FilerServer struct { @@ -80,6 +83,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) } util.LoadConfiguration("notification", false) + fs.option.recursiveDelete = v.GetBool("filer.options.recursive_delete") fs.filer.LoadConfiguration(v) notification.LoadConfiguration(v.Sub("notification")) |
