#!/usr/bin/tclsh
-# $Id: robot.tcl,v 1.36 2003/06/10 11:55:18 adam Exp $
+# $Id: robot.tcl,v 1.37 2003/06/10 12:08:17 adam Exp $
#
proc RobotFileNext1 {area lead} {
# puts "RobotFileNext1 area=$area lead=$lead"
global status
global debuglevel
+ puts "RobotFileOpen task=$task path=$path"
+
if {![info exists workdir]} {
return stdout
}
for {set i 0} {$i <= $len} {incr i} {
set d [lindex $comp $i]
- if {[catch {cd $d}]} {
+ if {[string length $d] == 0} {
+ cd /
+ } elseif {[catch {cd $d}]} {
+ puts "mkdir (1) d=$d"
exec mkdir $d
cd ./$d
if {![string compare $area unvisited] && $i == $len && $mode == "w"} {
set d "d[lindex $comp $i]"
if {[string length $d] > 1} {
if {[catch {cd $d}]} {
+ puts "mkdir (2) d=$d"
exec mkdir $d
cd ./$d
}