projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add Spanish mods from Angel
[spider.git]
/
perl
/
importwwv.pl
diff --git
a/perl/importwwv.pl
b/perl/importwwv.pl
index bca63688e28751f68dd1817f42524787f8bd126d..2a86e0dee74164210f3db4a538c1cde8ec2fda40 100755
(executable)
--- a/
perl/importwwv.pl
+++ b/
perl/importwwv.pl
@@
-101,6
+101,10
@@
sub out
open OUT, ">$tmp/$fn" or die "import $tmp/$fn $!";
print OUT map { "$_\n" } @_;
close OUT;
open OUT, ">$tmp/$fn" or die "import $tmp/$fn $!";
print OUT map { "$_\n" } @_;
close OUT;
+
+ # Note we do this this way to make the appearance of
+ # the file in /spider/chat_import atomic. Otherwise there
+ # exists the possiblity of race conditions and other nasties
link "$tmp/$fn", "$import/$fn";
unlink "$tmp/$fn";
}
link "$tmp/$fn", "$import/$fn";
unlink "$tmp/$fn";
}