Skip to content

Commit

Permalink
improve variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it authored and saw-jan committed Jan 10, 2024
1 parent 88f88a7 commit b556444
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/serve/s3/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ func (b *s3Backend) setAuthForWebDAV(accessKey string) *vfs.VFS {
if _, ok := b.w.f.(*webdav.Fs); ok {
info, name, remote, config, _ := fs.ConfigFs(b.w.f.Name() + ":")
f, _ := info.NewFs(context.Background(), name+accessKey, remote, config)
vfs := vfs.New(f, &vfsflags.Opt)
vfsFs := vfs.Fs()
fs := vfsFs.(*webdav.Fs)
fs.SetBearerToken(accessKey)
return vfs
vf := vfs.New(f, &vfsflags.Opt)
vf.Fs().(*webdav.Fs).SetBearerToken(accessKey)
return vf
}
return vfs.New(b.w.f, &vfsflags.Opt)
}
Expand Down

0 comments on commit b556444

Please sign in to comment.