if {$stuffsaved} return
if {![winfo viewable .]} return
- catch {
+ if {[catch {
if {[file exists $config_file_tmp]} {
file delete -force $config_file_tmp
}
puts $f "}"
close $f
file rename -force $config_file_tmp $config_file
+ } err]} {
+ puts "Error saving config: $err"
}
set stuffsaved 1
}