projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ffab51
)
Output file generated at very end rather than at beginning.
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 2 Mar 2009 04:18:58 +0000
(
05:18
+0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 2 Mar 2009 04:18:58 +0000
(
05:18
+0100)
Output is produced to a temporary file (.tmp) and then renamed at
very end if operation is succesful.
src/charconv.tcl
patch
|
blob
|
history
diff --git
a/src/charconv.tcl
b/src/charconv.tcl
index
4412c2a
..
f09b82e
100644
(file)
--- a/
src/charconv.tcl
+++ b/
src/charconv.tcl
@@
-414,7
+414,7
@@
if {![info exists ifiles]} {
usage
}
-set ofilehandle [open $ofile w]
+set ofilehandle [open ${ofile}.tmp w]
preamble_trie $ofilehandle $ifiles $ofile
foreach ifile $ifiles {
@@
-422,4
+422,6
@@
foreach ifile $ifiles {
}
close $ofilehandle
+file rename -force ${ofile}.tmp ${ofile}
+