Commit 0ccd1cb2 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix to thumbnail production; instead of reading binary data with a

backtick cat, open the file and read it like a real program would.
parent 3e26b2b6
......@@ -521,7 +521,17 @@ for ($attempt = 0; $attempt < 16; $attempt++) {
print STDERR "Error generating thumbnail.\n";
else {
TBExptSetThumbNail($pid, $eid, `cat $fname`);
open(FD, "< $fname")
or fatal("Could not open $fname!\n");
my $binstuff = "";
my $buf;
while (read(FD, $buf, 8192)) {
$binstuff .= $buf;
TBExptSetThumbNail($pid, $eid, $binstuff);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment