Merge pull request #1244 from cloudreve/webdav-root

fix: cannot redirect root folder (close #1242)
This commit is contained in:
AaronLiu 2022-04-26 16:42:03 +08:00 committed by GitHub
commit a3d0291f41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -384,6 +384,9 @@ func (fs *FileSystem) CreateDirectory(ctx context.Context, fullPath string) (*mo
}
if fullPath == "/" {
if fs.Root != nil {
return fs.Root, nil
}
return fs.User.Root()
}