mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
refactor: add an enum for filesystem providers
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
committed by
Nicola Murino
parent
c992072286
commit
5e2db77ef9
@@ -219,9 +219,9 @@ func (s *Service) advertiseServices(advertiseService, advertiseCredentials bool)
|
||||
|
||||
func (s *Service) getPortableDirToServe() string {
|
||||
var dirToServe string
|
||||
if s.PortableUser.FsConfig.Provider == 1 {
|
||||
if s.PortableUser.FsConfig.Provider == dataprovider.S3FilesystemProvider {
|
||||
dirToServe = s.PortableUser.FsConfig.S3Config.KeyPrefix
|
||||
} else if s.PortableUser.FsConfig.Provider == 2 {
|
||||
} else if s.PortableUser.FsConfig.Provider == dataprovider.GCSFilesystemProvider {
|
||||
dirToServe = s.PortableUser.FsConfig.GCSConfig.KeyPrefix
|
||||
} else {
|
||||
dirToServe = s.PortableUser.HomeDir
|
||||
|
||||
Reference in New Issue
Block a user