From: Adam Dickmeiss Date: Thu, 28 Feb 2002 14:04:11 +0000 (+0000) Subject: Fix unvisited status X-Git-Tag: ZMBOT.0.1~5 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=d3b424b82aa43e0a5264e2de5f411dafe1445a92;p=tclrobot.git Fix unvisited status --- diff --git a/robot.tcl b/robot.tcl index ffbfce4..56e33a4 100755 --- a/robot.tcl +++ b/robot.tcl @@ -1,5 +1,5 @@ #!/usr/bin/tclsh -# $Id: robot.tcl,v 1.30 2002/02/17 09:29:18 adam Exp $ +# $Id: robot.tcl,v 1.31 2002/02/28 14:04:11 adam Exp $ # proc RobotFileNext1 {area lead} { # puts "RobotFileNext1 area=$area lead=$lead" @@ -171,23 +171,18 @@ proc RobotFileOpen {area host path {mode w}} { exec mkdir $d cd ./$d if {![string compare $area unvisited] && $i == 1 && $mode == "w"} { - set out [open frobots.txt w] - puts "creating robots.txt in $d" - close $out - incr status(unvisited) + if {[string compare $path /robots.txt]} { + set out [open frobots.txt w] + puts "creating robots.txt in $d" + close $out + incr status(unvisited) + } } } } set d [lindex $comp $len] if {[string length $d]} { set out [open f$d $mode] - if {0} { - if {[file isfile $d/f]} { - set out [open $d/f $mode] - } else { - set out [open f$d $mode] - } - } } else { set out [open f $mode] }