If it was taken in the direction it was going, he says to him: ‘here is yours in front of you’ - אם בדרך הליכתה ניטלה אומר לו הרי שלך לפניך
Summary:
רש"י explains דרך הליכה to mean in the same direction, while (תוס' (ר"ח explains דרך הליכה to mean that they confiscate it only on the road, and שלא בדרך הליכה they search and confiscate even in the houses.