filepath clean.

This commit is contained in:
Miroslav Šedivý 2022-11-19 18:29:21 +01:00
parent 76b44b949c
commit cdb9b185f2
4 changed files with 40 additions and 26 deletions

View file

@ -1,6 +1,8 @@
package config
import (
"path/filepath"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@ -73,4 +75,5 @@ func (s *WebSocket) Set() {
s.FileTransfer = viper.GetBool("file_transfer")
s.UnprivFileTransfer = viper.GetBool("unpriv_file_transfer")
s.FileTransferPath = viper.GetString("file_transfer_path")
s.FileTransferPath = filepath.Clean(s.FileTransferPath)
}