add WebDAV support

Fixes #147
This commit is contained in:
Nicola Murino
2020-08-11 23:56:10 +02:00
parent 9a15a54885
commit a9e21c282a
48 changed files with 3376 additions and 363 deletions

View File

@@ -54,6 +54,7 @@ const (
SSHLoginMethodKeyAndPassword = "publickey+password"
SSHLoginMethodKeyAndKeyboardInt = "publickey+keyboard-interactive"
FTPLoginMethodPassword = "ftp-password"
WebDavLoginMethodPassword = "dav-password"
)
var (
@@ -222,7 +223,7 @@ func (u *User) AddVirtualDirs(list []os.FileInfo, sftpPath string) []os.FileInfo
}
for _, v := range u.VirtualFolders {
if path.Dir(v.VirtualPath) == sftpPath {
fi := vfs.NewFileInfo(path.Base(v.VirtualPath), true, 0, time.Time{})
fi := vfs.NewFileInfo(v.VirtualPath, true, 0, time.Now())
found := false
for index, f := range list {
if f.Name() == fi.Name() {