]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Mon, 6 Dec 1999 18:10:05 +0000 (18:10 +0000)
committercas <cas@opencascade.com>
Mon, 6 Dec 1999 18:10:05 +0000 (18:10 +0000)
src/WOKUtils/WOKUtils_Replace.tcl

index 61ee6f0c8e5ff123b2ac843a1579674bf4cad6d7..17cd940fd7f558f289ce9cad3f828b94ad0bef3f 100755 (executable)
@@ -62,12 +62,14 @@ proc WOKUtils_Replace::Execute { unit args } {
 
        regsub -all "/" " $source $target" $replstr  TheArgs
 
-       set A [catch {eval exec "cmp $TheArgs"} result ]
-
-       if { $result != "" } {
+        if { [file exist $target] } {
+         set A [catch {eval exec "cmp $TheArgs"} result ]
+         if { $result != "" } {
            set result 0
-       } else { set result 1 }
-       
+         } else { set result 1 }
+        } else {
+          set result 0 }
+
        if { ! $result } {
            msgprint -i -c "WOKUtils_Replace::Execute" "Copy $source to $target"
            if { [file exist $target] && [wokparam -e %Station $unit] != "wnt" } {