mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
allow to mount virtual folders on root (/) path
Fixes #783 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -283,7 +283,7 @@ func GenerateEd25519Keys(file string) error {
|
||||
// for example if the path is: /1/2/3/4 it returns:
|
||||
// [ "/1/2/3/4", "/1/2/3", "/1/2", "/1", "/" ]
|
||||
func GetDirsForVirtualPath(virtualPath string) []string {
|
||||
if virtualPath == "." {
|
||||
if virtualPath == "" || virtualPath == "." {
|
||||
virtualPath = "/"
|
||||
} else {
|
||||
if !path.IsAbs(virtualPath) {
|
||||
|
||||
Reference in New Issue
Block a user