mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
@@ -175,7 +175,11 @@ type SFTPFs struct {
|
||||
// NewSFTPFs returns an SFTPFs object that allows to interact with an SFTP server
|
||||
func NewSFTPFs(connectionID, mountPath, localTempDir string, forbiddenSelfUsernames []string, config SFTPFsConfig) (Fs, error) {
|
||||
if localTempDir == "" {
|
||||
localTempDir = filepath.Clean(os.TempDir())
|
||||
if tempPath != "" {
|
||||
localTempDir = tempPath
|
||||
} else {
|
||||
localTempDir = filepath.Clean(os.TempDir())
|
||||
}
|
||||
}
|
||||
if err := config.Validate(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user