Context. Transition disks are circumstellar disks that show evidence of a dust cavity, which may be related to dynamical clearing by embedded planet(s). Most of these objects show signs of significant accretion, indicating that the inner disks are not truly empty, but that gas is still streaming through to the star. A subset of transition disks, sometimes called pre-transition disks, also shows a strong near-infrared excess, interpreted as an optically thick dusty belt located close to the dust sublimation radius within the first astronomical unit. Aims: We study the conditions for the survival and maintenance of such an inner disk in the case where a massive planet opens a gap in the disk. In this scenario, the planet filters out large dust grains that are trapped at the outer edge of the gap, while the inner regions of the disk may or may not be replenished with small grains. Methods: We combined hydrodynamical simulations of planet-disk interactions with dust evolution models that include coagulation and fragmentation of dust grains over a large range of radii and derived observational properties using radiative transfer calculations. We studied the role of the snow line in the survival of the inner disk of transition disks. Results: Inside the snow line, the lack of ice mantles in dust particles decreases the sticking efficiency between grains. As a consequence, particles fragment at lower collision velocities than in regions beyond the snow line. This effect allows small particles to be maintained for up to a few Myr within the first astronomical unit. These particles are closely coupled to the gas and do not drift significantly with respect to the gas. For lower mass planets (1 MJup), the pre-transition appearance can be maintained even longer because dust still trickles through the gap created by the planet, moves invisibly and quickly in the form of relatively large grains through the gap, and becomes visible again as it fragments and gets slowed down inside of the snow line. Conclusions: The global study of dust evolution of a disk with an embedded planet, including the changes of the dust aerodynamics near the snow line, can explain the concentration of millimetre-sized particles in the outer disk and the survival of the dust in the inner disk if a large dust trap is present in the outer disk. This behaviour solves the conundrum of the combination of both near-infrared excess and ring-like millimetre emission observed in several transition disks.