Skip to content

Commit

Permalink
Merge pull request #11 from TRON-US/BTFS-1266
Browse files Browse the repository at this point in the history
BTFS-1266
  • Loading branch information
taiyangc authored Dec 27, 2019
2 parents e7da0e1 + 02ccd54 commit 973e6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reed_solomon.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewReedSolomonSplitter(r io.Reader, numData, numParity, size uint64) (
}
// If not a FileInfo object, or fails to fetch a size, try reading
// the whole stream in order to obtain size (this is common for testing).
if !ok || err != nil {
if !ok || err != nil || fi.AbsPath() == "" {
// Not a file object, but we need to know the full size before
// being streamed for reed-solomon encoding.
// Copy it to a buffer as a last resort.
Expand Down

0 comments on commit 973e6b6

Please sign in to comment.