Changeset 4135


Ignore:
Timestamp:
Jan 20, 2014, 11:18:06 AM (11 years ago)
Author:
mmc
Message:

Oops! Fixed the handling of run files. If the task -resultdir is set to
@default and the session directory doesn't exist, then the run file is
stored in the current directory. This is the behavior that Rappture has
had all along. It got messed up when -resultdir was introduced at the
task level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lang/tcl/scripts/task.tcl

    r4127 r4135  
    372372                if {[info exists _resources(-resultdir)]} {
    373373                    set rdir $_resources(-resultdir)
     374                } else {
     375                    set rdir "."
    374376                }
    375377            } elseif {$resultdir ne ""} {
     
    379381            if {$status == 0 && $rdir ne ""} {
    380382                catch {
    381                     if {![file exists $_resources(-resultdir)]} {
    382                         _mkdir $_resources(-resultdir)
     383                    file delete -force -- $file
     384                    if {![file exists $rdir]} {
     385                        _mkdir $rdir
    383386                    }
    384387                    set tail [file tail $file]
    385                     set fid [open [file join $_resources(-resultdir) $tail] w]
     388                    set fid [open [file join $rdir $tail] w]
    386389                    puts $fid "<?xml version=\"1.0\"?>"
    387390                    puts $fid [$result xml]
    388391                    close $fid
    389                     file delete -force -- $file
    390392                }
    391393            } else {
Note: See TracChangeset for help on using the changeset viewer.