Skip to content

Commit

Permalink
Merge pull request #127 from BenB196/staging
Browse files Browse the repository at this point in the history
Fixed issue where file.mime_type could be duplicate values
  • Loading branch information
BenB196 authored Feb 6, 2021
2 parents a5472d5 + 0b59108 commit 8e35fb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.3
9 changes: 8 additions & 1 deletion ffsEvent/ffsFetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
fileType = "symlink"
}

var mimeType []string
if ffsEvent.MimeTypeByBytes != ffsEvent.MimeTypeByExtension {
mimeType = []string{ffsEvent.MimeTypeByBytes, ffsEvent.MimeTypeByExtension}
} else {
mimeType = []string{ffsEvent.MimeTypeByBytes}
}

file := &eventOutput.File{
Path: ffsEvent.FilePath,
Name: ffsEvent.FileName,
Expand All @@ -243,7 +250,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
Created: createTimestamp,
Mtime: modifyTimestamp,
Directory: ffsEvent.DirectoryId,
MimeType: []string{ffsEvent.MimeTypeByBytes, ffsEvent.MimeTypeByExtension},
MimeType: mimeType,
}

//user fields
Expand Down

0 comments on commit 8e35fb3

Please sign in to comment.