Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
thmour committed Oct 14, 2020
1 parent 836e940 commit 355549e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/storage/utils/cephfs/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ type Config struct {
Uploads string `mapstructure:"uploads"`
DataDirectory string `mapstructure:"data_directory"`
RecycleBin string `mapstructure:"recycle_bin"`
Versions string `mapstructure:"versions"`
Shadow string `mapstructure:"shadow"`
References string `mapstructure:"references"`
}
Expand Down Expand Up @@ -86,8 +85,6 @@ func (c *Config) init() {

c.References = path.Join(c.Shadow, "references")
c.RecycleBin = path.Join(c.Shadow, "recycle_bin")
c.Versions = path.Join(c.Shadow, "versions")

}

func (gl *Global) init(c *Config) {
Expand Down Expand Up @@ -116,7 +113,7 @@ func NewCephFS(c *Config) (storage.FS, error) {
c.init()

// create namespaces if they do not exist
namespaces := []string{c.DataDirectory, c.Uploads, c.Shadow, c.References, c.RecycleBin, c.Versions}
namespaces := []string{c.DataDirectory, c.Uploads, c.Shadow, c.References, c.RecycleBin}
for _, v := range namespaces {
if err := os.MkdirAll(v, 0755); err != nil {
return nil, errors.Wrap(err, "could not create home dir "+v)
Expand Down Expand Up @@ -230,7 +227,7 @@ func (fs *cephfs) wrapSnap(key string) string {
}

func (fs *cephfs) unwrap(ctx context.Context, np string) string {
ns := fs.getNsMatch(np, []string{fs.conf.DataDirectory, fs.conf.References, fs.conf.RecycleBin, fs.conf.Versions})
ns := fs.getNsMatch(np, []string{fs.conf.DataDirectory, fs.conf.References, fs.conf.RecycleBin})
var external string
if !fs.conf.DisableHome {
layout, err := fs.GetHome(ctx)
Expand Down

0 comments on commit 355549e

Please sign in to comment.