webdav: user caching is now mandatory

we cache the lock system with the user, without user caching we cannot
support locks for resource
This commit is contained in:
Nicola Murino
2020-11-04 22:29:25 +01:00
parent 0a14297b48
commit 0119fd03a6
7 changed files with 18 additions and 27 deletions

View File

@@ -72,8 +72,8 @@ func (fi *webDavFileInfo) ContentType(ctx context.Context) (string, error) {
return contentType, nil
}
contentType, err := fi.Fs.GetMimeType(fi.fsPath)
mimeTypeCache.addMimeToCache(extension, contentType)
if contentType != "" {
mimeTypeCache.addMimeToCache(extension, contentType)
return contentType, err
}
return "", webdav.ErrNotImplemented