Changeset 701 for trunk/gsascmds.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:10:34 PM (11 years ago)
Author:
toby
Message:

# on 2003/05/22 21:43:32, toby did:
Workaround for win-XP bug where archive fails because rename does not work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsascmds.tcl

    • Property rcs:date changed from 2003/04/10 22:13:02 to 2003/05/22 21:43:32
    • Property rcs:lines changed from +62 -1 to +20 -6
    • Property rcs:rev changed from 1.49 to 1.50
    r673 r701  
    12191219    catch {
    12201220        set file $expnam.O$num
    1221         file rename -force $expgui(expfile) $file
     1221        file copy -force $expgui(expfile) $file
    12221222        set fp [open $expnam.LST a+]
    12231223        puts $fp "\n----------------------------------------------"
     
    13481348    set newfile [tk_getSaveFile -initialfile $suggested -parent $parent]
    13491349    if {$newfile == ""} return
    1350     file rename -force $current $newfile
     1350    if {[catch {
     1351        file rename -force $current $newfile
     1352    }]} {
     1353        file copy -force $current $newfile
     1354        file delete -force $current
     1355    }
    13511356    if {$window != ""} {destroy $window}
    13521357}
     
    13581363        set root [file root $expgui(expfile)]
    13591364        catch {file delete -force $root.tmp}
    1360         catch {file rename -force $root.LST $root.OLS}
     1365        if {[catch {file rename -force $root.LST $root.OLS}]} {
     1366            file copy -force $root.LST $root.OLS
     1367            file delete -force $root.OLS
     1368        }
    13611369        # PSW reports this does not happen right away on windows
    13621370        set i 0
     
    13831391        catch {exec [file join $expgui(gsasexe) disagl] \
    13841392                [file tail $root] < disagl.inp > disagl.out}
    1385         catch {file rename -force $root.LST $root.tmp}
     1393        if {[catch {file rename -force $root.LST $root.tmp}]} {
     1394            file copy -force $root.LST $root.tmp
     1395            file delete -force $root.LST
     1396        }
    13861397        catch {file delete -force disagl.inp disagl.out}
    1387         catch {file rename -force $root.OLS $root.LST}
     1398        if {[catch {file rename -force $root.OLS $root.LST}]} {
     1399            file copy -force $root.OLS $root.LST
     1400            file delete -force $root.OLS
     1401        }
    13881402        donewait
    13891403        # open a new window
Note: See TracChangeset for help on using the changeset viewer.