Commit d2e91935 authored by Leigh Stoller's avatar Leigh Stoller

Direct the thumb render to the expwork directory, and then copy to

www/thumb directory. Putting it in the expwork directory causes the
.png file to saved in the users exp directory, and in the longterm
archive for the experiment (expinfo).

If we decide to keep NS files in the DB for longterm storage, we
should keep the .png files along with them (they are generally very
small, under 1k bytes).
parent c878eaef
......@@ -2,7 +2,7 @@
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
......@@ -429,12 +429,17 @@ foreach $node (keys %nodes) {
### Generate thumbnail, if called for.
# Generate thumbnail, if called for. The .png file is put into the work
# directory, so it is copied off to the users and the archive directory.
if ($thumb) {
if (system("$THUMB_CMD $pid $eid > @prefix@/www/thumbs/tn$thumb.png")) {
my $workdir = TBExptWorkDir($pid, $eid);
my $fname = "$workdir/$eid.png";
if (system("$THUMB_CMD $pid $eid > $fname")) {
print STDERR "Error generating thumbnail.\n";
system("cp -pf $fname @prefix@/www/thumbs/tn$thumb.png");
### Success!!
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