--- tgdb.orig Wed Mar 3 16:21:31 2004 +++ tgdb Thu Mar 4 11:10:57 2004 @@ -42,7 +42,9 @@ } foreach $web ( @weblist ) { - processWeb( $web ) if ( -d "$dataDir/$web" ); + # christo: _default is no real web ... + # maybe we don't need to process Trash as well? + processWeb( $web ) if ( -d "$dataDir/$web" and $web ne '_default'); } print "End create $touchgraph\n" unless $opt_q; } @@ -78,8 +80,21 @@ $the_topic = $file; processTopic( $dataDir, $web, $file ) if ( -d "$dataDir/$web" ); } + + # christo: check if pub/$web exists + if (! -d "$pubDir/$web/") { + if (! mkdir "$pubDir/$web/") { + warn "could not make $pubDir/$web/ $!"; + return; + }; + } + # christo: warn instead of die - open LIST, ">$pubDir/$web/$touchgraph" or warn "$web/$touchgraph: $!"; + if (! open LIST, ">$pubDir/$web/$touchgraph") { + warn "$web/$touchgraph: $!"; + return; + } + print "\n$web/$touchgraph... "; foreach my $p (sort keys %parent_child) {