The call to read() was reading the whole file in memory, which would
explode at runtime for very long logs.
This commit removes the check on empty files, which could result in
links being shown in the report page that are effectively useless.
The ideal solution would be to use something like Node's Stream class,
to perform the same check without loading everything in memory. Decided
not to implement this for now, as the feature being removed doesn't seem
important enough to warrant spending the necessary time dealing with Node.js in
order to re-implement it with Streams.
The call to
read()
was reading the whole file in memory, which would explode at runtime for very long logs.This commit removes the check on empty files, which could result in links being shown in the report page that are effectively useless.
The ideal solution would be to use something like Node's
Stream
class, to perform the same check without loading everything in memory. Decided not to implement this for now, as the feature being removed doesn't seem important enough to warrant spending the necessary time dealing with Node.js in order to re-implement it with Streams.Let me know what you think.