From db354e838c3e3feb4ee50c489547f543f26e01c7 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Fri, 5 Mar 2021 08:41:24 +0100 Subject: [PATCH] portable mode: fix WebDAV support --- service/service_portable.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/service_portable.go b/service/service_portable.go index 4f24d875..c85bc048 100644 --- a/service/service_portable.go +++ b/service/service_portable.go @@ -94,6 +94,7 @@ func (s *Service) StartPortableMode(sftpdPort, ftpPort, webdavPort int, enabledS } else { binding.Port = 49152 + rand.Intn(15000) } + webDavConf.Bindings = []webdavd.Binding{binding} webDavConf.CertificateFile = webDavCert webDavConf.CertificateKeyFile = webDavKey config.SetWebDAVDConfig(webDavConf) @@ -126,8 +127,7 @@ func (s *Service) getServiceOptionalInfoString() string { if config.GetWebDAVDConfig().CertificateFile != "" && config.GetWebDAVDConfig().CertificateKeyFile != "" { scheme = "https" } - info.WriteString(fmt.Sprintf("WebDAV URL: %v://:%v/%v", - scheme, config.GetWebDAVDConfig().Bindings[0].Port, s.PortableUser.Username)) + info.WriteString(fmt.Sprintf("WebDAV URL: %v://:%v/", scheme, config.GetWebDAVDConfig().Bindings[0].Port)) } return info.String() }