Fix bug introduced by loose matching.

This commit is contained in:
Eric S. Raymond 2008-10-14 13:02:45 +00:00
parent 1ec9e5cd09
commit 50673f21b1

View File

@ -14,7 +14,7 @@ def pop_to_top(whoami):
upwards.reverse()
for pathpart in upwards:
# Loose match because people have things like git trees.
if pathpart.find("wesnoth"):
if os.path.basename(pathpart).find("wesnoth") > -1:
break
else:
os.chdir("..")