mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
improve temp dirs handling an some logs
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -268,11 +268,7 @@ 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 == "" {
|
||||
if tempPath != "" {
|
||||
localTempDir = tempPath
|
||||
} else {
|
||||
localTempDir = filepath.Clean(os.TempDir())
|
||||
}
|
||||
localTempDir = getLocalTempDir()
|
||||
}
|
||||
if err := config.validate(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user