Hi,

Usually, Avast will block the download of infected files automatically

Hope it helps