diff options
| author | fukachan <fukachan> | 2004-05-25 04:03:49 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-05-25 04:03:49 +0000 |
| commit | eea8a8a60c94984fc60eb8642f44e24453f2e1ae (patch) | |
| tree | 870e9ba400e3fcb21d555866a10a92891c923a41 /fml/lib/IO/Adapter | |
| parent | 2ade973949b05deb4d692b6c8e4bf5c45e94a930 (diff) | |
| download | fml8-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.pm | 4 |
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 { |
