The antifungal activity of Lactobacillus pentosus ŁOCK 0979 depends both on the culture medium and on the fungal species. In the control medium, the strain exhibited limited antagonistic activity against indicator food-borne molds and yeasts. However, the supplementation of the bacterial culture medium with polyols (erythritol, lactitol, maltitol, mannitol, sorbitol, xylitol) or their galactosyl derivatives (gal-erythritol, gal-sorbitol, gal-xylitol) enhanced the antifungal properties of Lactobacillus pentosus ŁOCK 0979. Its metabolites were identified and quantified by enzymatic methods, HPLC, UHPLC-MS coupled with QuEChERS, and GC-MS. The presence of polyols and gal-polyols significantly affected the acid metabolite profile of the bacterial culture supernatant. In addition, lactitol and mannitol were used by bacteria as alternative carbon sources. A number of compounds with potential antifungal properties were identified, such as phenyllactic acid, hydroxyphenyllactic acid, and benzoic acid. Lactobacillus bacteria cultivated with mannitol synthesized hydroxy-fatty acids, including 2-hydroxy-4-methylpentanoic acid, a well-described antifungal agent. Scanning electron microscopy (SEM) and light microscopy confirmed a strong antifungal effect of L. pentosus ŁOCK 0979.