Skip to content

[BUG] LFS objects are not always detected! #1763

@goran-w

Description

@goran-w

In methods CommitDetail.SetViewingBlobAsync() and FileHistoriesSingleRevision.GetRevisionFileContentAsync(), when processing a ObjectType.Blob the Commands.IsBinary() check is made BEFORE the LFSObject.Parse() check!

This sometimes causes an LFS object to be wrongly detected as a Binary object and displayed as such, which is clearly a bug. Currently, this in turn leads to either (wrongly) displaying the BINARY FILE NOT SUPPORTED!!! indication, or trying to display the file as an image but failing.
(Example: JPG 0 x 0 0 B)

The fix is simple - make sure to check if the Blob uses LFS before checking if it's Binary / Text.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions