Skip to content
Snippets Groups Projects
Commit 09cb57ac authored by Andy Yates's avatar Andy Yates
Browse files

logic was very wrong. we never closed a FH meaning lots of corrupted files

parent 9c894fca
No related branches found
No related tags found
No related merge requests found
......@@ -134,11 +134,11 @@ sub production_name {
sub tidy_file_handle {
my ($self, $fh, $path) = @_;
if ($fh->tell() == 0) {
$fh->close() unless $fh->opened();
unlink($path);
$fh->close() if $fh->opened();
unlink($path) if -f $path;
return 1;
}
$fh->close() unless $fh->opened();
$fh->close() if $fh->opened();
return 0;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment