I have seen many people who scold if someone crosses the path where someone is praying.
But the following hadith says otherwise.
Bukhari :: Book 1 :: Volume 9 :: Hadith 490
The things which annul the prayers were mentioned before me. They said, "Prayer is annulled by a dog, a donkey and a woman (if they pass in front of the praying people)." I said, "You have made us (i.e. women) dogs. I saw the Prophet praying while I used to lie in my bed between him and the Qibla. Whenever I was in need of something, I would slip away. for I disliked to face him."
It shows that even prophet muhammad (PBUH) didnt mind praying while someone was in front of him or moving in front of him.
So what is the right thing to do?