chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use .tmp for temporary files and write-then-rename
[ypp-sc-tools.db-test.git]
/
pctb
/
commod-results-processor
diff --git
a/pctb/commod-results-processor
b/pctb/commod-results-processor
index cea64e5190318e437c5ad55ff6368cfe0f8a68ed..3ea53be79f49b73a36b9be2f592a307a05b2833e 100755
(executable)
--- a/
pctb/commod-results-processor
+++ b/
pctb/commod-results-processor
@@
-244,7
+244,7
@@
sub refresh_commodmap() {
my $incommodmap=0;
my $intag='';
my %got;
my $incommodmap=0;
my $intag='';
my %got;
- my $o= new IO::File "#commodmap#.tsv.
new
",'w' or die $!;
+ my $o= new IO::File "#commodmap#.tsv.
tmp
",'w' or die $!;
undef %commodmap;
my $xp= new XML::Parser
undef %commodmap;
my $xp= new XML::Parser
@@
-292,7
+292,7
@@
sub refresh_commodmap() {
# print STDERR "[[[$content]]]\n";
$xp->parse($content);
close $o or die $!;
# print STDERR "[[[$content]]]\n";
$xp->parse($content);
close $o or die $!;
- rename "#commodmap#.tsv.
new
","#commodmap#.tsv" or die $!;
+ rename "#commodmap#.tsv.
tmp
","#commodmap#.tsv" or die $!;
}
our %newcommods;
}
our %newcommods;