Sadi Carnot's theorem regarding the maximum efficiency of heat engines is considered to be of fundamental importance in thermodynamics. This theorem famously states that the maximum efficiency depends only on the temperature of the heat baths used by the engine, but not on the specific structure of baths. Here, we show that when the heat baths are finite in size, and when the engine operates in the quantum nanoregime, a revision to this statement is required. We show that one may still achieve the Carnot efficiency, when certain conditions on the bath structure are satisfied; however if that is not the case, then the maximum achievable efficiency can reduce to a value which is strictly less than Carnot. We derive the maximum efficiency for ...