Skip to content

Class function TFile.ReadAllBytes return value is always empty

Summary

Class function TFile.ReadAllBytes contains a bug which also affects ReadAllText class functions.

System Information

Affects all OS

Steps to reproduce

Use TFile.ReadAllBytes class function. Return value is always empty.

What is the current bug behavior?

TFile.ReadAllBytes/TFile.ReadAllText return values are always empty.

What is the expected (correct) behavior?

Return value should contain the content of the given file.

Possible fixes

In System.IOUtils, class function TFile.ReadAllBytes(const aPath: string):

ReadBuffer(Result,0);

should read

ReadBuffer(Result,size);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information