diff options
| author | bs106 <bs106@student.ugal.ro> | 2019-12-17 09:47:12 +0000 |
|---|---|---|
| committer | bs106 <bs106@student.ugal.ro> | 2019-12-17 09:47:12 +0000 |
| commit | ce79a31448e16ec55f5efb7c02bb5118454582c3 (patch) | |
| tree | d10153757d1dd9d30460e8df7cdaf5c0ed8f4de4 /weed/filesys/filehandle.go | |
| parent | 5961e0d9eb35492e44ad8ee059a1d177e667d8dc (diff) | |
| download | seaweedfs-ce79a31448e16ec55f5efb7c02bb5118454582c3.tar.xz seaweedfs-ce79a31448e16ec55f5efb7c02bb5118454582c3.zip | |
Fix missing leading dot in extension
Diffstat (limited to 'weed/filesys/filehandle.go')
| -rw-r--r-- | weed/filesys/filehandle.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 645bdc92e..101f5c056 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -92,9 +92,9 @@ func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *f if req.Offset == 0 { // detect mime type - var possibleExt string - fh.contentType, possibleExt = mimetype.Detect(req.Data) - if ext := path.Ext(fh.f.Name); ext != possibleExt { + detectedMIME := mimetype.Detect(req.Data) + fh.contentType = detectedMIME.String() + if ext := path.Ext(fh.f.Name); ext != detectedMIME.Extension() { fh.contentType = mime.TypeByExtension(ext) } |
