While entering, the photon"thinks" that both slits are open and decides it's path. But then it will meet the obstacle.So, what will happen to the light wave after this?
Nothing special! The photon doesn't ``think''. If the obstacle is, indeed, defined as shown, light exiting the upper slit will get reflected along the outer boundary of the obstacle. Messy technically, but no conceptual difficulty.
With just one slit you get the diffraction pattern for that slit. If the slit is narrow (comparable to the wavelength) that is fairly uniform across the screen. Cover only the top slit and you get the diffraction pattern for the bottom slit.
Leave both uncovered and you see the product of the interference pattern with the diffraction pattern which for narrow slits is mainly the well known interference patterns of light and dark fringes.
The explanation for the young's double slit experiment is rather simple:
1) the phenomenon of the EM-wave has nothing to do with the photon, it is an independent phenomenon of oscillation within the media (ethere). The photon is a small energy packet, rotating around its velocity vector.
2) the photon has a very strong E-field, transverse to its velocity vector, with a closed equally strong magnetic field surrounding the E-field.
3) the photon can pass in any of the slits, while a part of its EM-field, pass through the other slit. This, cut away, EM-field will turn into an EM-wave, when exiting the slit, having the same frequency of oscillation as the photon. This is the reason for the interference pattern.
4) If you put an obstacle, like you show in the picture, you will have a single photon or a single EM-wave coming out.
5) In fact, it might be possible to measure the difference , this could be an interesting experiment!
The interference in question appears only when you have two sources, i.e. two slits. Where you have an EM-wave coming out from one skit, at the same time and with the same frequency as the photon, coming out from the other one.
If you do that you see superposition of the waves, they are closely related effects of course. If you throw in handful of gravel, the same thing happens but you won't see a clear pattern. For light, if you use two lasers with nearly identical wavelengths, you might see a pattern of fringes but they will be moving due to the frequency difference. For two white light sources, you won't see anything but a single white light source shone through two slits will give fringes.
A lot of work has been done on slits, you can use them as antennas in the radio world. The ideas behind them come from geometrical optics, have a look at the diagrams on the right side of this link: