Changeset 935 for trunk

Show
Ignore:
Timestamp:
30/06/2008 16:12:16 (5 months ago)
Author:
james
Message:

put the stats file somewhere sensible now

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/extra/stats.tcl

    r834 r935  
    216216proc bMotion_stats_load { } { 
    217217        global bMotionModules bMotion_stats_id bMotion_stats_time bMotion_stats_key 
     218        global bMotionLocal 
    218219 
    219220        set line "" 
    220221 
    221222        set bMotion_stats_time 0 
     223 
     224        # look for a stats file in the local dir first 
     225        set statsFile "$bMotionLocal/stats.txt" 
     226 
     227        if {![file exists $statsFile]} { 
     228                # try in the old location 
     229                set statsFile "$bMotionModules/stats.txt" 
     230        } 
    222231 
    223232        catch { 
     
    261270        bMotion_putloglev 4 * "bMotion_stats_write" 
    262271        global bMotion_stats_id bMotion_stats_key bMotionModules 
    263         set fileHandle [open "$bMotionModules/stats.txt" "w"] 
     272        global bMotionLocal 
     273 
     274        set fileHandle [open "$bMotionLocal/stats.txt" "w"] 
    264275 
    265276        puts $fileHandle [clock seconds]