summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fml/lib/IO/Adapter/AtomicFile.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/fml/lib/IO/Adapter/AtomicFile.pm b/fml/lib/IO/Adapter/AtomicFile.pm
index cf62cd44..c66edc4e 100644
--- a/fml/lib/IO/Adapter/AtomicFile.pm
+++ b/fml/lib/IO/Adapter/AtomicFile.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: AtomicFile.pm,v 1.10 2004/01/24 09:00:53 fukachan Exp $
+# $FML: AtomicFile.pm,v 1.11 2004/02/15 04:38:36 fukachan Exp $
#
package IO::Adapter::AtomicFile;
@@ -197,7 +197,7 @@ sub close
$fh->SUPER::close();
}
- if (rename($temp, $orig)) {
+ if (-s $temp && rename($temp, $orig)) {
return 1;
}
else {