summaryrefslogtreecommitdiff
path: root/fml/lib/IO/Adapter
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-05-25 04:03:49 +0000
committerfukachan <fukachan>2004-05-25 04:03:49 +0000
commiteea8a8a60c94984fc60eb8642f44e24453f2e1ae (patch)
tree870e9ba400e3fcb21d555866a10a92891c923a41 /fml/lib/IO/Adapter
parent2ade973949b05deb4d692b6c8e4bf5c45e94a930 (diff)
downloadfml8-eea8a8a60c94984fc60eb8642f44e24453f2e1ae.tar.gz
fml8-eea8a8a60c94984fc60eb8642f44e24453f2e1ae.tar.bz2
fml8-eea8a8a60c94984fc60eb8642f44e24453f2e1ae.zip
check temporary file is non-zero.
Diffstat (limited to 'fml/lib/IO/Adapter')
-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 {