Allow pop_to_top() to handle git trees and other variations.

This commit is contained in:
Eric S. Raymond 2008-10-14 03:10:26 +00:00
parent 8bb915ddaf
commit e509631392

View file

@ -13,7 +13,8 @@ def pop_to_top(whoami):
upwards = os.getcwd().split(os.sep)
upwards.reverse()
for pathpart in upwards:
if pathpart == "wesnoth":
# Loose match because people have things like git trees.
if pathpart.find("wesnoth"):
break
else:
os.chdir("..")