projects
/
tclrobot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
94a5446
)
Fixes for tasks w full paths
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 10 Jun 2003 12:08:17 +0000
(12:08 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 10 Jun 2003 12:08:17 +0000
(12:08 +0000)
robot.tcl
patch
|
blob
|
history
diff --git
a/robot.tcl
b/robot.tcl
index
968e64e
..
c79b410
100755
(executable)
--- a/
robot.tcl
+++ b/
robot.tcl
@@
-1,5
+1,5
@@
#!/usr/bin/tclsh
#!/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"
#
proc RobotFileNext1 {area lead} {
# puts "RobotFileNext1 area=$area lead=$lead"
@@
-148,6
+148,8
@@
proc RobotFileOpen {task area host path {mode w}} {
global status
global debuglevel
global status
global debuglevel
+ puts "RobotFileOpen task=$task path=$path"
+
if {![info exists workdir]} {
return stdout
}
if {![info exists workdir]} {
return stdout
}
@@
-169,7
+171,10
@@
proc RobotFileOpen {task area host path {mode w}} {
for {set i 0} {$i <= $len} {incr i} {
set d [lindex $comp $i]
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"} {
exec mkdir $d
cd ./$d
if {![string compare $area unvisited] && $i == $len && $mode == "w"} {
@@
-193,6
+198,7
@@
proc RobotFileOpen {task area host path {mode w}} {
set d "d[lindex $comp $i]"
if {[string length $d] > 1} {
if {[catch {cd $d}]} {
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
}
exec mkdir $d
cd ./$d
}