It seems even flies have their limits when it comes to disgusting food.
Like us, the insects are repelled by rotten fruit covered in toxic mould and bacteria, research has shown. They are just somewhat less fussy.
Scientists discovered a brain circuit in flies that allows them to detect repulsive odours. "When this compound is present in the air, even the most attractive food sources become unattractive," said lead researcher Dr Bill Hansson, from the Max Planck Institute for Chemical Ecology in Germany.
The detection system enables flies to avoid feeding or laying their eggs on bug-ridden spoiled food.
Dr Hansson's team studied the fruit fly, Drosophila melanogaster, that feeds on the yeast growing on fermenting fruit.
The researchers identified a neural circuit in the flies that is highly sensitive to geosmin, a chemical produced by harmful fungi and bacteria.
Even when fruit emitted other odours that would normally attract the flies, any whiff of geosmin caused them to stay away.
Dr Marcus Stensmyr, also from the Max Planck Institute for Chemical Ecology, a co-author of the research published in the journal Cell, said: "It is obviously highly important for all organisms to stay away from spoiled food.
"Detecting and avoiding food infested by bad microbes seems to be a ubiquitous phenomenon, where the nervous system has evolved to extreme degrees to make it work."